A castle is a fortified structure built during the Middle Ages. It was predominantly built by the nobility or royalty and by military orders. Use of the term has varied over time and has been applied to structures as diverse as hill forts and country houses.