I was wondering how astronomers know that a star is for example 50 light years away, how can they know when light travels from there and reaches here and even if they did, they would not wait for 50 years. I have asked my physics teacher at school and a student in Glasgow university but they did not have a clear answer. I also checked online but it is too hard for me to understand.
One more question what determines if a main sequence star will be a red giant or a super red giant?.
We know what the speed of light is from experiments conducted here on Earth, and there are various methods of working out how far away a star is. For example if you take two images six months apart, so Earth is on opposite sides of it's orbit, then relatively nearby stars will seem to have moved slightly compared to distant galaxies since we are looking at them from a slightly different angle, an effect called parallax. From the amount the star seems to move we can then work out how far away it is. Once we know how far away the star is can translate that into how long it would take light from that star to reach us, which is where the measurement of a distance in light-years comes from. Light-years are used just because measuring things in trillions of kilometres even for small distances gets a bit tiresome.
Regarding red giants vs red supergiants the main determining factor is the mass of the star. Stars that are around half the mass of our Sun, up to ones about 8 times the mass of the Sun will become red giants, stars more than about 10 times the mass of the Sun will become red supergiants.