Edinburgh is a great city with a lot to offer visitors. I've written about some of those things in the past, and I will write about more going forward. But one of the magical things about the city is the 2 different faces of the city - the New Town and the Old Town.
When I started researching the city before visiting I knew about these 2 parts and I understood the basic difference of them, but until you actually go there it's hard to tell the difference between them and where you should stay when visiting and why.
The Old Town is where the city was first built around the 16th Century, it was a highly congested area with tall buildings to house all the residents. The main road is the Royal Mile. At the top of the hill is Edinburgh Castle and at the bottom is Hollyrood Palace. In between is shops, restaurants, museums, apartments and hotels. Much of the Royal Mile was rebuilt in the 1800's after a fire damaged much of the Old Town. This is a very touristy area, but it also has the look and feel of an OLD city. It's also quite pretty. There are several locations with great views of the city - Scott Monument, Edinburgh Castle and Camera Obscura, but you can also get great views from the streets too, just go down a side street and you can see the city.
The New Town is just down the hill, depending on where you are in the city there is more or less hill involved. It's very modern looking. Clean lines, fancy stores, pubs, restaurants. It's aesthetically pleasing and has a bunch of stores you can find at home, like the Disney store. It's a new town, it was built for the rich people who were too good for the yucky (plumbing used to be throwing your "toilet" out the window), old town.
Now that I have sort of pushed the Old Town and picked on the New Town, I have a caveat. The Old Town is where you go for the history and that old world feel. But it's mostly full of tourists, in part because there are many tourist sites on the Royal Mile. I don't think there are many locals hanging out there. The New Town, while perhaps not offering the history, is where people are. Locals are shopping, working, and eating there.
If you're looking to visit Edinburgh and want to know where to spend your time (and where you might want your hotel). If it's 2 days, then stick around the the Old Town area, that is where you'll end up spending most of your time. But if you're going to be in the city for a week then the New Town is probably a better area to stay in since it is less touristy.