The castle is mainly in ruins, but the site itself is evocative and has dramatic coastline views. It was founded around 1200 as a fortified home for the bishop of St Andrews. After the execution of Protestant reformers in 1545, other reformers retaliated by murdering Cardinal Beaton and taking over the castle. They spent almost a year holed up, during which time they and their attackers dug a complex of siege tunnels; you can walk (or stoop) along their damp, mossy lengths.
The visitor centre gives a good audiovisual introduction and has a small collection of Pictish stones.