Europe has thousands of years of history, full of myths and legends. Centuries may have passed, but the legacies of past rulers live on, represented by castles that were built during times of war and invasion. These grand fortresses, some in ruins , others restored to their former glory, provide a silent testament to a time long past.

Prague Castle, Czech Republic
Calling Pražský hrad a castle is a masterful understatement – it is really a compact walled city, with cathedral, palaces, streets and houses. A succession of ambitious rulers enhanced the original 9th-century fortifications, somehow blending complementary Romanesque, Gothic, baroque and Renaissance delights. But in truth there is one better place to be than in the castle – and that is outside it, looking up. As the sun's glow fades on a summer evening, or the snowflakes drift in and out of the street lights on a chill winter's night, few sights are more stirring than the view from among the statues on Charles Bridge across to the hilltop redoubt.

Explore the thousand-year history in the Story of Prague Castle exhibition, in the Old Royal Palace's Gothic vaults.

Eilean Donan, Scotland
Brooding, solitary, rugged… and that is just the gatekeeper. Eilean Donan, perched atop an island on Loch Duich, is the castle that launched a thousand Scottish tourist brochures. And why not? Just the approach will have your mental bagpipes wheezing, clopping across the arched stone bridge towards the grey battlements, mist drifting across the rippling water… at least, that is how it was in the many movies filmed here, and to be fair, it is often like that in reality. Inside, it is a fair re-creation of former glories – the medieval castle was pulverised in 1719 by English troops, then rebuilt in the early 20th Century.

Buses from Inverness and Fort William stop in the village of Dornie, near the castle, which opens March to October only.

Schloss Neuschwanstein, Germany
Bavaria's “mad” King Ludwig II, the Wagner-loving royal, obsessed with romantic epics of knightly lore, created castles of stereotypical fairytale grandeur. His apotheosis came with Neuschwanstein, started in 1869 atop a wooded outcrop. Witch-hatted turrets, Minstrels' Hall, grand throne room – all that is missing is a wicked sorcerer and perhaps a distressed damsel incarcerated in a tower. You do not need to join the hordes inside to appreciate Ludwig's vision; stop at the Marienbrücke (Mary's Bridge), itself picturesquely spanning a waterfall in the Pöllat Gorge, for unforgettable views of the castle.

To arrive at the castle like a pampered prince or princess, take a horse-drawn carriage up from nearby Hohenschwangau village.

Castell de Púbol, Spain
If you believe fairytales are real, perhaps you are ready for the surreal. This medieval monument at La Pera in Catalonia, a compact Gothic-Renaissance affair, was fascinating enough before it was bought by Salvador Dalí in 1968. But after he installed his wife Gala here, and refurbished it to his own unique tastes, it became something else. His trademark leftfield flourishes lurk to wrong-foot unwary visitors. For example, Gala's tomb in the subterranean crypt is guarded by a stuffed giraffe. Of course. Even ignoring the oddities, it is a charming place perched above a very strollable, traditional village.

Regular buses between Palafrugell and Girona stop at La Pera, about 2km from the Castell.

Tintagel, England
Let me tell you a story about a boy who pulled a sword from a stone to become king, aided by a wizard called Merlin… The legend of King Arthur has been so long entwined with Tintagel Island that it was probably already in the mind of the Earl of Cornwall when he ordered his castle built here in 1233. Today, his stronghold is all the better for lying in ruins; crossing the fragile-looking bridge from the mainland builds the atmosphere for wanders among the clifftop site, where waves crash against the rocks below. Even the screeching seagulls sound mystical here.

Stop in at Tintagel Old Post Office, an absurdly lovable jumble of a 14th-century house, on your way to the castle.

Palácio Nacional de Pena, Portugal
Palaces, you say? How many? In Sintra, you cannot move for tripping over them. There is the ruined Castelo dos Mouros overlooking the town, where another white palace dominates the main plaza. The fantastical Quinta da Regaleira sits amid its lush gardens; then there is Monserrate, an exotically faux-Moorish affair. But the crown goes to pastel-turreted Palácio Nacional da Pena. Somewhere, buried under the castellated walls of the current 19th-century edifice, lurk the relics of a medieval convent. But you would never know it: instead this kitsch confection of Gothic, Manueline and Islamic styles dominates, housing an Aladdin's cave of treasures.

Suburban line trains depart Lisbon every 15 minutes for the 45-minute run to Sintra, making it an easy day trip from the capital.

Château de Peyrepertuse, France
As you meander along mountain roads in Languedoc-Roussillon in France's far southwest, hilltop fortresses loom above, some standing proud, others snaggle-tooth ruins. Did noble knights set forth from these castles on fine steeds to battle evil? Actually -- and there is no way to break this gently -- the knights were the bad guys here. The 13th-century Albigensian Crusade saw tens of thousands of Cathar “heretics” slaughtered – and these bastions saw the Cathars' last stands. The castle at Peyrepertuse, the largest and most vertiginously sited, now hosts displays of falconry and medieval combat, but wander to the battlements, gaze over the rugged landscape, and imagine the lives (and deaths) of its erstwhile inhabitants.

A 195km, full-day backroads drive between Carcassonne and Perpignan visits the four most impressive Cathar castles.

Corvin Castle, Romania
Because sometimes fairytales are actually nightmares, Europe's spookiest castle is, appropriately, located on Dracula's rumoured patch in Transylvania; some say Vlad was imprisoned here. If you do not feel a shiver down your spine when approaching over the bridge, with the river cascading far below, you do not have a fear gland. It seems like the only reason there are not vampires here today is because the werewolves ate them all. It was the stronghold of the powerful Hungarian Corvin family in the 15th Century; more recently, Ceauşescu spitefully built hideous steelworks alongside the castle. Even so, the ugly neighbourhood cannot diminish the grim gravitas of the massive stone walls, turrets and Gothic bulk.

The nearest transport hub is Deva, 18km north, from where buses make the run of 30 to 40 minutes to Corvin Castle.

Titania's Castle, Denmark
In a land where beloved queens and princesses still live in enchanting – if not enchanted – castles, it is apt that such palaces are everywhere. And Egeskov Slot is a paragon of castledom: set in beautifully landscaped, peacock-prowled gardens, the 16th-century towered bastion sits inside its moat, accessed via a drawbridge. Within its walls nestles the real treasure: head to the first floor to see possibly the planet's most magical doll's house, Titania's Castle. Elaborately furnished and decorated with tiny treasures, it was built at the request of an English army officer's daughter to house the fairies that lived in the garden.

Egeskov has several museums and no fewer than four mazes – spend half a day exploring the grounds and castle.

Malbork Castle, Poland
Bigger is not always better – but try telling that to boys. The Teutonic Knights were clearly out to impress when they built this vast edifice, reputedly Europe's largest Gothic castle. Declaring Malbork (then called Marienburg) their capital in 1309, the knights kicked off a rush of property development, expanding the original convent into an enormous fortification with towers, deep moats, strong walls, an armoury and a palace for the Grand Masters. All that did not prevent capture, first by Poles and then by Prussians, and the castle was virtually razed during WWII. Now restored, it houses an extensive museum – but it is the monumental building that wows.

Malbork is a 45-minute train ride from Gdańsk, itself worth exploring for its wonderfully restored medieval centre.

The article 'Fairytale-like European castles' was published in partnership with Lonely Planet.