Stellar age determination is, at best, estimated. One method which aims at the age of a specific star uses stellar rotation: stars are presumed to rotate due to angular momentum in the molecular clouds from which they form. They slowly lose this rotation as stellar wind carries away angular momentum, so a particular rotation rate is characteristic of a particular age. This method of estimation is called gyrochronology.
A number of factors give some overall notion of the star's age:
Determining the ages of one or more neighboring stars can helps determine the age their other neighbors as well; Stellar clusters (e.g., globular clusters, open clusters), stellar association, and moving groups are assumed to have formed stars over a relatively short period, thus the ages of some stars in the cluster (e.g., massive stars, necessarily young) implies a similar age for stars in the cluster that will have a longer lifetime.