Answer by Thomas Zerbarini:
You can do it visually.
When I first started to learn how to fly, my instructor made it a point to teach me how to judge distance quickly while in an airplane. The technique we used, that I still use today, was to use a map with known distances and features. Then we would use the map to determine our exact position. Then look for another landmark that we can accurately identify on the map, measure our distance on the map and look intently out the window to get the "picture" of what that distance looks like.
This method is also usable on the ground. When you're driving you can determine a mile, 1/2 mile and so on by the mile markers and signs on the road that tell you distance to the next exit. By developing your skill to determine distance with known markers, you'll be able to quickly estimate your distance from land marks and object with reasonable accuracy.
To apply this to an aircraft do the following:
Get to know the types of airplanes you intend to use regularly. Spend time at the airport and get a sight feel of how big or small the aircraft are when you're close to them, then look at that same aircraft 1/4, 1/2 and then 1, 2, and 3 miles away. Over time you will be able to develop your skill to quickly determine the distance these aircraft are away from you either on the ground or in the air.