Leagues are temporary rankings that usually last for a week. You rank up by winning matches and earning coins. Your ranking depends on the total number of coins earned since the last league reset.