We docked in Rosyth, the port across the Firth of Forth. Holland America provided a free shuttle to the commuter train, which took us into central Edinburgh. We were very easily able to tour the town on our own. We went to Edinburgh Castle (excellent). Edinburgh is very hilly with stairs and hills everywhere. Do your research on what you want to see. This is not a city which can be covered in only 1 day.
There was a free shuttle taking us into town, near Trinity College. There was a hop-on-hop-off bus stop right there. The HOHO bus tours in every city are great because you get a guided tour of the city and can get off at all the major sites and reboard once you are done. There are all sorts of things to see and do in Dublin and it is a really walkable city, if you like walking! The HOHO bus took us everywhere we wanted to go.