If you’re in Edinburgh, you have to visit Edinburgh Castle. We visited in June on a very hot day (atypical for Scotland!), but that did not hinder exploring. We had a Historic Scotland pass and arrived just before the gates opened, so the wait in line to get in was only about 10-15 minutes.
Once inside, go on a free guided tour to get yourself oriented. The Castle is quite large with many buildings, rather than one single traditional castle building. The tour helps to orient you to the buildings and castle layout, with some additional historical info. The castle has several levels, so be prepared to walk on some hilly terrain that is mostly rock and cobblestone.
Take the time to visit all the different small museums. We didn’t bother with an audio guide, as there are lots of signs and the museums are filled with information. The guide might not be worth the line.
We stayed until the 1 o’clock gun (a modern cannon!) and had lunch in the cafe next to the cannon area. Food was very good, and seeing the cannon fire was fun.
All in all, plan on spending most of your day at the Castle. Definitely not something to do if you only have an hour or two, the full experience takes several hours. But really worth it!