How Medieval Castles Were Built?

The castles of, medieval times were built for safety purposes and not comfort. At first, they were made of wood on hilly areas called mottes. When it was realized how quickly and easily wood would burn, they started making them of stone.