Stars can loose mass in a variety of ways.
Our own Sun is steadily ejecting a 'wind' of particles at a rate of one 100 trillionth of its total mass every year. At the present rate, this will not amount to more than perhaps the mass of the Earth over the life time of the Sun. But as stars age, this ejection rate increases greatly and can reach as high as the mass of a star like the Sun in a million years or less. The star is evolving through its so-called red giant phase enroute to producing a planetary nebula, or for more massive stars, even a super nova. Stars in binary star systems can exchange mass between themselves over the course of millions of years which can change the evolution of the member stars.