Every Hungarian child knows what happened in Eger in the autumn of 1552. An Ottoman army that had just taken a string of Hungarian castles laid siege to this one, and a garrison of about 2,000 soldiers, townspeople and women held it for 39 days under István Dobó until the Ottomans gave up and left. The story became the national novel, Géza Gárdonyi's Egri csillagok (Eclipse of the Crescent Moon), and the castle a place of pilgrimage. The irony is that Eger fell anyway in 1596 and stayed Ottoman for 91 years, which is why a minaret still stands in the middle of town.
What you see now is mostly 18th century. When the Ottomans left, the bishops of Eger rebuilt it as a baroque church town, with a university building grander than many palaces, and dug the soft volcanic tuff under it into miles of wine cellars. Eger is still a wine town first: its red blend, Egri Bikavér, "Bull's Blood", is the most famous Hungarian wine after Tokaji, and in the Valley of the Beautiful Women you can taste it straight from the barrel for a few euros.
Eger is small, so the plan uses its hills. Day one is the castle and the old town, day two the Lyceum, the Basilica and an evening in the wine cellars, day three a trip into the Bükk at Szilvásvárad, day four the lakes and caves of Lillafüred and the cave bath at Miskolctapolca, and day five the baths and the salt hill at Egerszalók. It's two hours from Budapest, and the Budapest guide and Hungary page will help you with the rest of the country.