Zac Giles
Castle's were invented to either fight enimes or for a member of the royal family to live in.
castles were made in the medieval time
For the protection and safety of the rich and the central point for local medieval governments.
Usually from stone, but early motte and baily forts were made of wood. Some fortresses in Eastern Europe were made of brick, since stone is scarce there.