A castle is a strong building that was often the home of a king or lord in medieval times and afterward. Castles were built in many places, including Japan, India, and other countries. The castle rose rapidly in western Europe beginning in the 9th century onwards.