What is the role of the stars in some of my lessons?

The role of the stars is to measure your progress in certain lessons. Based on the number of mistakes you're making, the stars are taken away. If the progress in the lesson was not enough, you'll be asked to repeat it.