How do astronomers measure distance to nearby stars?
Parallax is a technique that is used to figure out the distance to a star. It involves viewing the same object (a star in this case) from two different perspectives. This is a difficult procedure and is commonly done by viewing the object of interest when Earth is in opposite positions in its orbit around the Sun.
Once the parallax angle
For further details and information, see this.