Dublin Castle has a conflicted history with the rest of the city. Up until the War of Independence, it was the seat of administration of the British occupation, and a notorious place of imprisonment for many years. All that remains of the titular Castle is one tower, and the whole area is a mishmash of architecture that spans Dublin history from medieval times to the 1980s with a heavy emphasis on the Georgian period.
The castle is home to the fantastic Chester Beatty Library (which has a lovely Middle Eastern Cafe) and has lots of interesting buildings to explore. You can take part in a guided tour of the State Apartments for a small price, or explore the Chapel Royal for free. For my part, I like to just wander around the grounds and spend time relaxing in the gardens. On a sunny day, it’s a good place to bring lunch and escape the crowds of the city.