The winner is the player with most VPs at the end of the game. VPs come from your Terraform Rating (TR), your tiles on the game board, won awards, claimed milestones, and VPs on cards you have played.