Just look at a map, Tony. (Apologies for stating the obvious, but it really is that simple.)
Regarding mutianyu, iirc it's just outside the city limits, but you can certainly go there. However, if you want to stay overnight, confirm with your hotel first.