|MadSci Network: Astronomy|
The distance of a star is measured in the Astronomical Unit, which is equal to the distance between the Sun and Earth. The diameter of the Earth's orbit, therefore, is 2 Astronomical Units.
Now, in order to measure the distance of a star, pictures are taken of it, with an interval of six months between pictures. During this 6 month period, the earth has completed one half of its orbit around the sun. From these two series of pictures, one can calculate the parallax angle, which is subsequently used in this algebraic formula to calculate the distance.
A nice illustration of this calculation can be found here!
[Moderator's note: the distance to a planet in our solar system is found in a different way. We use knowledge of the planet's orbit, and of the Earth's orbit, to figure out the positions of the planet and the Earth, and from the positions we can find the distance.]
Try the links in the MadSci Library for more information on Astronomy.