Geocentric and Heliocentric parallax
We now use the Earth itself as a base. Take a photo at two different times in one night.
The distance between two positions of the same observer during one night is used as the base. Nearby stars appear to move more than stars further away. The distance between the two positions can be calculated from the time difference between the two observations, accounting for the rotation of the Earth.
Note that in this diagram the base could never be the complete diameter of the Earth because it would require the observer to see below the horizon.
Here we use the distance from Earth to the Sun as the base. Take a photo of the night sky in two different seasons, about half a year apart. The orbit of the earth around the sun is used as the base.
Nearby stars appear to move more than stars further away. The baseline can be up to 2 AU. This allows to measure distance traditionally to about 500 light year (or about 150 pc).
The green star is closest because it has the largest parallactic shift.
The blue star is further away, but still a lot closer than the red background stars, who do not appear to have any shift at all.
Watch a great explanation in this video (1:58) by Las Cumbres Observatory.