Dublin Castle has played a key role in Ireland's history ever since it was founded by the Normans in the twelfth century, on the site of the original Viking harbor known as Black Pool. ("Dubhlinn" in Irish, this is where the city gets its name.)
To get past the Upper Courtyard and see inside the castle rooms you have to go on a 50-minute guided tour, which at time of writing (August 2013) cost only 4.50 euros.
The tour is rather a polished barrage of dates, facts, and names, but is extremely interesting if you can keep up, and traces the history of the castle (and by extension, of both Dublin and Ireland as well) from inception right the way through to present day.
Much of the tour concentrates on the rule of the British viceroys, and it's fascinating to learn of the role the castle played in the Irish rebellion of 1916.
Wandering the lavishly decorated rooms (which are sometimes closer to dizzyingly gaudy than merely ornate), you'll learn other golden nuggets of information, such as why the throne no longer has any feet (hint: Queen Victoria was rather short), what the convex mirrors in the dining room were for, and how writers such as Jonathan Swift and Bram Stoker were linked to the castle.
The tour ends with a quick trip to the subterranean Undercroft, the only section which looks like a "proper" castle (rather than a palace). It contains the remains of the thirteenth century Norman Powder Tower, the oldest medieval structure in Dublin.