Hold a thumb at arm's length and close one eye, then the other. Your thumb seems to jump against the background. Nothing moved; your viewpoint did. Astronomers use the same trick to measure how far away stars are, with the whole orbit of the Earth as their pair of eyes.
The Earth circles the Sun once a year, at a distance of about 150 million kilometres. In January and again in July we sit on opposite sides of that circle, roughly 300 million kilometres apart. A nearby star, seen from those two places, appears to shift slightly against the far more distant stars behind it. Over a year it traces a small ellipse (or a line, or a circle, depending on where it sits in the sky). The half-width of that wobble is called the star's parallax.
The nearer the star, the bigger the wobble. And because the geometry is a thin triangle with the Earth's orbit radius as one short side, the distance falls out of a single division: distance in parsecs = 1 divided by the parallax in arcseconds. One parsec is, by definition, the distance at which a star has a parallax of exactly one arcsecond. It works out to about 3.26 light-years.
The top picture is a view from above the Solar System (not to scale: real stars are far too distant to fit). Drag the blue Earth around its orbit, or press Play to let a year pass. The bottom strip shows what a telescope sees: the faint background stars never move, but the bright star slides left and right. The ruler is in real arcseconds. Then change the distance and watch the wobble shrink.
Sizes are exaggerated in the top picture. In the strip the scale is true: the ruler runs from −1 to +1 arcsecond.
An arcsecond is 1/3600 of a degree. The parallax of Proxima Centauri, the nearest star to the Sun at about 4.24 light-years, is 0.7685 arcseconds. That is the angle covered by a 2-centimetre coin seen from 5.3 kilometres away. It is the biggest parallax of any star. Everything else is smaller, and most are far smaller. Drag the slider to 15 parsecs and the star swings only 0.067 arcseconds to either side, a sliver of the ruler.
That is why it took until the 1830s. For centuries the missing parallax was an argument against a moving Earth: if we really circle the Sun, why don't the stars shift? The answer turned out to be that they are very far away. Three astronomers got there almost together. Thomas Henderson measured Alpha Centauri from Cape Town in 1832–33, though he published in 1839. Friedrich Struve measured Vega in 1835–36. Friedrich Bessel, working in Königsberg, measured 61 Cygni and published in 1838.
Bessel chose 61 Cygni because it has a large proper motion, a steady drift across the sky that Giuseppe Piazzi had noticed in the 1790s. A star that moves fast across the sky is likely to be close. Bessel found a parallax of about 0.31 arcseconds, which put the star about 10.4 light-years away. Modern measurements give about 0.286 arcseconds and 11.4 light-years. He was off by less than 10 per cent, by catching a shift far too small for the eye to see. The button above puts you at about that distance.
Parallax is still the first rung of the cosmic distance ladder, the one all the other rungs are calibrated against. Space telescopes removed the blur of the atmosphere. The Hipparcos satellite, launched in 1989, could measure stars out to around 1,600 light-years. ESA's Gaia, launched on 19 December 2013, did far better: its second data release in 2018 gave typical parallax errors of 20 to 40 millionths of an arcsecond for stars brighter than magnitude 15. That is a shift equivalent to the width of a hair seen from hundreds of kilometres away, and it lets us place stars across a large part of our galaxy.
The recipe never changed, though. Look twice from opposite sides of the orbit, measure the tiny shift, and take one divided by it.