Parallax
Astronomical measurement of position are taken at different times of the year. Since the Earth's orbit is known exactly, the distance from position 1 to position 2 can be worked out. The angle from the horizon to the object can be measured precisely. This gives a triangle whose baseline and angles are known accurately. From the triangle, the distance is calculated by trigonometry and expressed in parsecs.