Parsecs are used as astronomical distance measurements. It comes from planar trigonometry.
So how it works is we know the distance from the Earth to the Sun. For convenience and standards, we often use 1 AU (astronomical unit). Since we orbit the sun, and move “side-to-side” in our view of the star, the way we observe a star changes over time. We can use this change to get that angle (the 1 arcsec angle).
What’s an arcsec? Since objects in space are very far, that shift in viewing results in a very small angle. (Think about how the moon looks like it’s just about in the same place no matter where you move. The further you are, the harder it is to tell actual distances in relation). So an arcsec is defined as 1/60th of an angular degree.A lot of people tend to use light years as a unit of measurement instead of the parsec. It’s easier to visualize, or at least conceptualize. A parsec is pretty much pure trigonometry. A light year is kinda cool cause we can imagine light moving very quickly. However, a parsec is about 3.262 light years. So you can convert them.
Just some astronomy math for you.