Castelsardo is like a big sandcastle that was built a really long time ago by some very cool people who wanted to protect their town from enemies who might want to steal their stuff or hurt them. It's like a big fortress that has really tall walls and towers with lookouts who could see danger coming from far away.
Some of the people who lived inside the sandcastle were very good at making things out of rocks and stones. They built their houses and buildings out of those things, and they even built a really cool castle for their leader to live in! The leader's castle was extra strong and had a drawbridge that could be lowered or raised to let people in or keep enemies out.
Over the years, many people have come and gone from Castelsardo, and they have added things to it and changed it in different ways. But even now, you can still see the big walls and towers and the cool castle that the people of Castelsardo built so long ago. It's like a really big and special sandcastle that you can visit and imagine what it would have been like to live there long ago.