By observing a nearby star from opposite sides of Earth's orbit (a 6-month baseline), we can measure its apparent shift against distant background stars to calculate its precise distance.
Geometric Distance
$$d = \frac{1}{p}$$
Where $d$ is distance in parsecs (pc), and $p$ is the parallax angle in arcseconds (").
1 Parsec = 3.26 Light Years = 206,265 AU. (1 AU = Distance from Earth to Sun).