Medieval castles provided shelter, security, and defense. They were built with strategic defensive structures like moats, drawbridges, and portcullises to keep out invaders. Inside, castles had basic areas like halls for living, kitchens for cooking, chapels for prayer, and towers for various uses including defense, sleeping, and imprisonment. Life in a castle was difficult even for the wealthy, with basic hygiene, little heating, and hard work being daily realities.