We have a rather large number of castles (and forts, too) round here in North Wales - all of them in various states of repair and lots of them are under 30 car minutes away from my little B&B. The reasons for all these fortifications and defence buildings are as numerous as the sites themselves.
There are hill forts dating as far back as the Iron Age (on Anglesey/on the Llyn Peninsula as well as in Snowdonia) and we're not entirely sure why there here and who did what in them, but they're on beautiful and strategically clever sites, ideal for walks.
On the right - the impressive huge Iron Age fort on Yr Eifl called Tre'r Ceiri dating back to around the second century AD - worth the cimb!
On the left - a well hidden and rather well preserved early settlement from when the Romans left Britain (around middle of the fourth century) near Moelfre called Din Lligwy .
Then there are the fairly well maintained Welsh Castles that Edward I built along the coastline to defend 'his' land against the Welsh as he's conquered Wales in the 13th century and wanted English immigrants to settle in towns, which he fortified with big castles.
These days the buildings are looked after by Cadw and there are big fortresses like Harlech and Conwy (see photo below) where the castles very obviously protect the town. In Conwy you also have a very well maintained medieval town wall that you can walk and from which I took this photo.
Other castles, like Caernarfon (pic here), the place where the Princes of Wales investitures take place, are fortress and ceremonial place in one.
Caernarfon is very different to other castles Edward had built - for example the towers aren't round, but polygonal as you can see in the photo here.
It's only half an hour to get there and it's most definitely worth a visit whether you're into history or just want to tire your children out by making them climb each of the numerous towers.
Edwards final castle - and in actual fact a building ruin as he never completed it (you can kind of tell as the entire place is at the same level) - is Beaumaris Castle on Anglesey. It's got a moat and provides you with lovely views due to its position on the isle.
But the Welsh actually built some of their own castles, Llywelyn the Great, built Dolbardarn Castle as you can see here, which is at the Llanberis Pass, and is a very different kind of fortification - a central heavily fortified keep formed the centre piece and still stands today.
There are over 20 castles nearby all in all. So the ones I've not got photos for or already written about:
11th century fortresses like Castell Aberlleiniog on Anglesey
Castles built by the Welsh themselves: Castell Caergwrle near Wrecsam, Dinas Bran Castle in Llangollen, Castell Dolwyddelan, Castell Ewloe in Flintshire, Castell Gwydir in Llanrwst
More Edwardian castles: Aberystwyth Castle, Chirk Castle, Criccieth Castle, Denbigh Castle, Flint Castle, Holt Castle, Rhuddlan Castle
Bodelwyddan Castle is now mainly used as a Hotel, but dates back to the 17th century originally
Newer ones like Gwrych Castle in Abergele or Penrhyn Castle near Bangor 'only' date back to the 19th century, but are in completely different states of repair.
So you can knock yourselves out if you're into history and ruins ;)