I did my study abroad semester at Coimbra in 2012, it is a charming college town with quite a bit of history, you should be able to get to Coimbra from Lisbon using public transport quite easily, I did that multiple times when I was there. The train station is ~10km from the town square.
If you do go to Porto certainly try Francesinha, which I believe is originally from Porto and something I remember most about my semester in Portugal.