When the Greeks categorized celestial objects by their brightness, they could only see how bright they looked from Earth. Their scale only tells us a star's apparent brightness, or apparent magnitude. We know that as we get farther away from a source of light, the light looks dimmer. Some stars appear brighter than others because they are closer to us, not because they give off more light.
How do we know which stars really shine the brightest? In addition to an apparent magnitude, we can also determine a star's absolute magnitude, which tells us what we would see if we were 10 parsecs away (A parsec is the same as 3.26 light years, 31x1012 km, or 19x1012 miles).
Once we know both the apparent and the absolute magnitudes of an object, we can figure out how far away it is from the Earth. If we call the apparent magnitude mapp and the absolute magnitude mabs, then we can find the distance (in parsecs) by using the following equation:
Proxima Centauri, that nice red star, is the star closest to our own sun (and a popular choice in sci-fi for future colonization). However, it's quite dim and very difficult to see at night. Its apparent magnitude is just 11.1, and it's absolute magnitude is a mere 15.5. How far away is it?
We know mapp=11.1, and mabs=15.5, so let's plug them into our distance equation:
and we see that d=1.32 parsecs, or about 4.3 light years away.