Portland/Weymouth- the ship docks, you cannot walk out of the port but have to take the free port authority shuttle bus into Weymouth (c 2 miles) and to Portland Castle (closer still). There is frequent local transit to other destinations on the Isle of Portland and lots of walking. Weymouth is a big seaside resort, so plenty to do here.
Also trains to Dorchester.
Guernsey is a tender port- the tenders land you in the town centre with lots of local transit around this small island BUT it is a renownedly tricky tender port, your chances of getting in are probably no more than 50:50
Edinburgh- you tender into South Queensferry. It does tend to blow up in the Firth of Forth, and it is not unusual for a ship to be unable to tender. If you do make it in you are about 8 miles out of the City Centre. Lothian Buses provide a special Cruise Shuttle Bus which is timetabled to take 30 minutes into the City Centre. Day tickets including all other Lothian buses and trams are £12.
Unless you go up steep steps from Hawes Pier to Dalmeny station for a train that is your only transit.
Cork/Cobh- you berth right in the town and opposite Cobh Railway Station- that provides the only transit into Cork City, every 30 minutes. Cobh is a very walkable town with the Titanic Museum and the Emigration Museum.
On rare instances you might berth at the old Ringaskiddy Ferry port across from Cobh- then you take the Bus Eireann local bus into the City.
Dublin- there are several berths which can be used. All are several miles out of the City. Usually the HoHo buses come down to meet the ships and usually the lines I sail with provide a shuttle bus into the City Centre (Princess won't tell you that, if they are, until the night before). Alternatively taxis will come down to the berth. You can also walk out (20 to 30 minutes) to the LUAS tram terminus.
However Princess normally do not even berth in Dublin port. They usually anchor off the old ferry port of Dun Laoghaire some miles south, and tender in. A free shuttle should be provided from the tender dock to the DART station (the frequent local rail service) into the City. The DART gets very crowded on cruise days, you may well have to stand. You should look at alternative local bus services into the city or to the LUAS terminus - Dublin Bus #46A every 10 minutes- journey time 30 minutes; or #75 to Tallaght LUAS terminus (46A is the much faster route)