Forts were generally built by a royal family or a sultan for their protection and the protection of the kingdom. Forts consisted of one or more palaces for the royal family to reside. Other inhabitants of the forts included soldiers, gardeners, farmers, workers, etc., who worked together to maintain the huge structure.
Museums are recently built to preserve items used by people in the past. They can contain paintings, dresses, letters, weapons, utensils, etc, and help people understand how people lived in the olden days.