How do scientists determine the age of stars? I was Googling about the oldest galaxies in the Universe. Everywhere is written that their age is known by the light. Referring to this line "Since light travels at a set speed, if you look at a star ten light years away, you're really seeing what it looked like ten years ago" on this site.

So my question is, as we know light is continuous, how do scientists know that a particular ray has started its journey some 1000 light years back? How is the age of stars determined?
Measuring the ages of stars is an incredibly difficult process. It is not something that can be summarised adequately in an SE answer. Please take a look at these references.

Soderblom et al. (2013); Jeffries (2014).

Methods split into -

Fundamental - e.g. radioisotope dating - only possible for the Sun

Semi-fundamental - kinematic traceback of stars to their birthplace; observing the depletion of lithium in a star.

Model-dependent - comparing the luminosity and temperature (and composition) of a star with that predicted by stellar evolutionary models. Or equivalently, its surface gravity and temperature.

Empirical - looking at how things like rotation and magnetic activity decline with age and using this to estimate the age of a star.

Statistical - using the metallicity or galactic space motions of a star to provide a (crude) estimate of its age.

There is also a lot more detail given in this SE answer.
Without using absolute magnitudes or isochrones, how might we tell a star&#39;s age and evolutionary status?