XP stands for Experience Points and, as the name suggests, is a measure of how experienced you are. XP determines your level and your level determines what league you are in.
Winning league matches increases your XP by 200 and losing increases it by 100. Some matches are "Win Only" so losses don't get you any XP.
You do not gain XP from battle matches.