There are three tour operators who run 'hop on hop off' tours of Edinburgh.
MacTours, had two tour routes running at the same time. The first through the old and new town, the second north to Leith and the harbour. Of the two the first is more popular and generally more interesting. If you have to choose do it (8 pounds per person). It takes in the castle, the royal mile, Holyrood, and the georgian new town.
As with any of these tours the commentary is the key. MacTours have genuinely entertaining and informative Guides, it is worth going around more than once just to get a different perspective. A single lap takes about an hour.
Although edinburgh is a compact city the hills can become daunting by mid afternoon,so even if you tire of the tour it is a useful way to get around.