Edinburgh has no underground. It has a good bus network, one tram line and a compact walkable centre.
Walking is usually fastest in the centre. Waverley to the castle is fifteen minutes; the Royal Mile is a mile. The complication is gradient rather than distance — the Old Town is a ridge with stepped closes running off it, and routes that look flat on a map are not.
Lothian Buses cover the city, frequently and cheaply, at a flat fare wherever you are going. Pay contactless on boarding and the system caps automatically at a daily maximum, so there is nothing to calculate. Cash requires exact change and none is given.
The tram runs one line from the airport through Princes Street and down to Newhaven via Leith. City journeys share the bus capping; the airport section costs more.
Waverley is the main station, in the valley between the two towns. Haymarket is the second, better for the west end.
Taxis can be hailed. Uber and Bolt both operate.
Cars are a bad idea: parking is scarce and expensive, the Old Town is restricted, and a Low Emission Zone applies in the centre.
Night buses run on the main corridors at a higher flat fare.
For the detail, see Getting Around Edinburgh.

