What was a medieval castle for?

All medieval castles were built
HINT: use the passive voice "ser + past participle"
How the test works

In Spanish is:

I'll be right with you...