From Halopedia, the Halo wiki
Experience points, commonly abbreviated as EXP or XP, unit of measurements awarded to players based on their performance in a multiplayer match.
EXP is only lost when a player leaves a match before it is over. This penalty typically only applies to team matches, in any playlist. Disconnect counts as quitting, which means that accidental quits through power or internet loss will be treated the same as quitting the match through the menu.
In a free-for-all match, such as Lone Wolves or Rumble Pit, a player is considered to have won if he finishes in the top half; as in a team match, a player wins if his team wins (multi team games involves placing 1st or 2nd, essentially the top half again).
Unlike in Halo 3 experience points are earned regardless if a player wins or loses a multiplayer match. The amount of experience points a player receives is based on how well they do in the match. Although there is a skill, called Party True Skill, based system determined by wins it does not affect a player's rank. Party True Skill will go down over time if the player stops playing the game.
Similar to Halo Wars experience is determined not by a win but how well a player does in a match. Experience can also be earned in Campaign, Firefight, completing challenges, and completing Commendations. Credits are the term used in place of XP in Halo: Reach.
Experience in Halo 4 is earned very similarly to both Halo Wars and Halo: Reach. However unlike in Halo: Reach experience can not be gained by playing Campaign. It is earned by playing matchmaking, completing missions in Spartan Ops, and completing challenges and commendations.
XP in Halo: Spartan Assault is used to purchase upgrades before the player starts a level. Players can purchase power weapons, armor abilities and boosts to improve their performance. XP is earned by completing levels, with the amount determined by performance. A bronze star awards 50XP, a silver star 100XP and a gold star 200XP. Players can increase this amount with multipliers for completing the level with skulls active. A player's XP is accumulated in a single repository across all platforms utilizing the same Xbox LIVE profile (Windows Phone 8, Windows 8, Xbox 360 and Xbox One).
XP in Halo 5: Guardians is used to advance players' multiplayer Spartan Rank. XP is awarded for completing matches and advancing commendations. Players can increase their XP earnings by using Boost cards in Arena and Warzone. XP should not be confused with the REQ points earned and used to purchase REQ packs.
343 Industries feature a weekend playlist regularly in Arena multiplayer. It awards increased XP to players.