Big subject with lots of subtleties about how it can be used, and abused. That said the title itself should be pretty self explanatory.
Essentially to gain access to the area of operations one needs to understand the international boundaries and alignment of various states in relation to both origination point and AOO.
All three are dependent on the views of the states concerned. Use Afghanistan as an example, given that it's landlocked there is no way to gain access without transiting through or over other states. Pakistan gives permission to gain access using their harbour facilities, and the communication routes that were originally built by the government of British India. As we are not at war with Afghanistan we're also dependent on their government permission to establish bases on their territory, from which we support their security efforts.
Iran, in contrast, doesn't allow either transit or basing.
Overflight is just one aspect of that, and can be mission dependent. Overflight can be granted for logistics but not for offensive operations for example.
As ever, there are trade offs and deals to be done. The existence of bases in the former Soviet states of Central Asia have some interesting consequences in terms of the positioning of those states with respect to Moscow for example.
Magic Mushroom is probably pretty well placed to get into the intricacies of overflight as it can impact on air control. There are similar issues around waterspace control, for example in the NAG. Prior to Telic the embargo enforcement boardings could only take place in international waters, unless the surge MIO rules were in place, so ship placement had to account for that and try to disrupt the ability of smugglers to remain in national waters.