Makkah is built around one point, and everything is described by its distance from it.
On foot
The hotels nearest the mosque are a few minutes away, and the walk is covered and well lit. Further out, allow twenty minutes and check whether your hotel runs a shuttle.
Shuttles and taxis
Shuttles run to a timetable that tightens around the prayers. Taxis are plentiful and are best agreed on before you get in.
The prayer times
Traffic stops around them, and roads near the mosque close entirely. If you have somewhere to be, be there before the call rather than after it.
Madinah
Flatter, calmer and easier to walk. Most groups find they use transport far less than they expected to.