You can't see all of Edinburgh in a day, but you can absolutely see the best of it. The city's headline sights are stacked into a compact, walkable core, and the whole thing tilts downhill from the Castle, so with one early start and a single sensible route you'll cover the Castle, the Royal Mile, a world-class museum, and the finest skyline view in Scotland without ever needing a bus.
This is the day I'd walk. Start at Edinburgh Castle for opening, wander down the Royal Mile with a stop at St Giles', break for a pulled-pork roll on Victoria Street, spend the afternoon in the (free) National Museum of Scotland, and end with sunset on Calton Hill. It's roughly 5-7 km all told, all on foot, top to bottom.
A few honest warnings: Edinburgh is hilly and the Old Town is cobbled, so wear shoes with grip. Pack a waterproof whatever the forecast says. And book your Castle ticket in advance, because that one queue is the only thing that can throw the timing off. If you've got longer, our 5-day Edinburgh itinerary adds Arthur's Seat, the Botanics, Dean Village, Leith, and Portobello Beach.