Stars are earned by completing match-3 puzzle levels. Each level has specific objectives that players must achieve within a limited number of moves. Successfully completing a level rewards you with stars.