Coimbra is a hill with a university on top and a river at the bottom. After 1139 Afonso Henriques made it the first capital of Portugal, the first two kings are buried here, and the university, chartered in Lisbon in 1290, settled here for good in 1537. The hill has been a UNESCO World Heritage Site since 2013.
Today the University of Coimbra has over 25,000 students, and you notice them: black capes on the stairs, guitars in squares at night, a May festival that fills the town. The sights are close together but the hill is steep, and several of the best things need a booked slot or a bus timetable. Two days covers the university, the cathedrals and the lower town. Three adds the Roman day at Conímbriga and a proper student evening, and that is the right length. More and you start repeating yourself.
Coimbra sits on the main line between Lisbon, about an hour and three quarters by fast train, and Porto, about an hour, so many people give it four hours between trains, enough for the library and not much else. This plan puts the university and the cathedrals on day one, Santa Cruz, the lower town and the south bank on day two, and Conímbriga plus a student night on day three. Start on a Tuesday: day three then falls on a Thursday, the students' night out, and the Conímbriga bus runs its fullest timetable on weekdays. For the bigger picture see Portugal.