VO2max measures how much oxygen you can use to perform "work." It is expressed in liters of oxygen per minute or in milliliters (1/1000 of a liter) of oxygen per kilogram of body weight per minute. It is largely limited by how much blood your heart can pump around and not, as most seem to think, by how much lung volume you have.
The value is obtained by measuring oxygen consumption at maximal effort. In general, a step-wise approach on a treadmill or static cycle is used, where exercise intensity increases until a maximum is reached. All the while you breathe through an apparatus that measures your actual oxygen consumption (difference in O2 between inhaled and exhaled air). Needless to say, such efforts are not recommended for people with cardiovascular problems.
A very good approximation can be had by measuring your best time to run a fixed distance. Or, as many seem to prefer, running for a fixed amount of time and measuring the distance covered. The two are equivalent but I guess the latter is "preferred" because it is a bit more tricky to do?
Let's just stick to the 5K and assume you are an average person (i.e. not to heavy and not too skinny). Warm up properly and run your 5K as hard as you can but at a steady pace. I chose 5K because it is easier to run a fixed pace for a short distance. But we need at least 5K -some argue 15 minutes- and most people need to run for at least 15 minutes to become fully aerobic. So if you are in the fastest group, you may want to run a 10K instead.
Here are some good values (for 5K run, in ml/kg/min):
Time VO2M Speed Pace
13 minutes 82.1 14.3 mph 4:11 minute mile
15 minutes 69.6 12.4 mph 4:49
17 minutes 60.2 11.0 mph 5:28
19 minutes 52.9 9.8 mph 6:06
21 minutes 47 8.9 mph 6:45
23 minutes 42 8.1 mph 7:24
25 minutes 38.3 7.5 mph 8:02 minute mile
Average for males and females in the "general population" is 48 and 39 respectively. Top runners and cyclists are anywhere between 70 and 90 for males and 50 and 70 for females.
VO2max is generally seen as the best measure of cardiovascular fitness and aerobic power. It does not measure how much anaerobic power you can produce and so it is quite useless for sprinters, and practitioners of sports where anaerobic power is key, like soccer, basketball, football, etc.
For simplicity's sake, aerobic exercise is all exercise that is steady over long periods of time (tens of minutes to hours), or increases/decreases gradually over time to a new set point. Any rapid increase in energy output bypasses the aerobic system. High intensity efforts, such as climbing steep hills on a bike also use a fair amount of anaerobic power.
There are individual differences as to what constitutes a rapid increase, and training matters a lot. The better trained you are the more aerobic you will be in everything you do. But even the best trained individuals resort to some anaerobic power production and anything that takes place in under a minute or is very intense is almost invariably anaerobic. The same applies to all initial exercise (before warm-up).
VO2max is an important parameter for endurance athletes, and top performers in running, cycling, swimming, cross-country skiing, rowing and canoeing have a high VO2 max. But VO2max does not tell the whole story and some athletes with lower measured VO2max have done better than others with higher readings.
Bottom line: Human performance in real life situations is not something you can capture in one number and your performance in the race matters more than the results of a fancy test.