Think about it. You’re sitting outside, the star is just there, still in the night sky, what information do you have? All you can see is it’s light and the direction where the light is coming from.
If you passed the light through a prism, you can see the different colors it is made of. We know from looking at different materials on earth through a prism, how much of every color different atoms will emit and absorb. If we compare that to the light from the star, we can know what the star is made of, that’s fucking awesome!
But that still doesn’t tell us the distance to the star, the second piece of information you have is the direction of the star, but that is not fixed since the earth is moving through space, every year stars will shift position because earth is rotating around the sun, the sky will look a little different in the summer compared to winter, that is the good news. If you could measure tiny changes in the direction of your star relative to the rest of the stars, you can figure out how far the star is. All you need is some patience and knowledge about triangles.
I will explain how you can do that at home with a candle (or anything). Put the candle between you and a wall (or anything), move one meter to the left and point a pen (or anything) from your eyes to the candle, where does the pen point on the wall? next move a meter to the right and point the pen again at the candle. It will point to a different spot on the wall, That’s parallax: The fact that the candle appears in two different spots on the wall. You can use parallax and knowledge about triangles to find the distance to the candle, and to the stars which is so fucking awesome.
In the example the candle represents the star, the wall represents the rest of the stars in the sky, the two meters you moved represents the motion of the earth around the sun, and you represents you looking at the night sky, enjoying the stars, and possibly making love.