XP stands for experience points.
Experience points are a way of keeping score in an RPG. Earn enough of those little bunnies and your character gets better, stronger and more awesome. Win enough XP and you gain a level and get harder to kill.
Or not. As with many niche hobbies, there are a multitude of loudly voiced views on XP and the earning thereof. The idea of course, is to encourage players to do things they might not otherwise consider doing. Deadly and dangerous things.
Back in the early days of D&D it was extremely simple. If you killed a monster, you earned XP. If you picked up treasure, you earned XP. Under the rules, only the person who delivered the killing blow earned any XP. This lead to a lot of very grumpy fighters who had spent ages swatting at a monster to reduce it enough for the killing blow to be delivered by someone else entirely. It also lead to the kind of larcenous behaviour that gets role players a bad name. "Ooh, we're at the inn. I take the candlesticks! Worth 20XP."
Gaining levels was nigh impossible for classes who didn't kill things or steal things, especially as not all classes gained levels at the same rate. A fighter only needed 1000XP to go up from level 1 to level 2, but a magic user needed 2,500. Bit of disparity there as your average magic user was completely useless until level 3 and it took an eternity to get there.
|Beware the might of the magic user|
The theory here was that high-level magic users were so dangerously powerful that they had to gain their goodies slowly. Tales abounded of magic-users who could demolish the entire campaign with a well-chosen spell. Fighters, clerics and thieves became progressively less useful as they went up in level compared to the magic-user. Those variable XP tables were intended to level the playing field.
Old school gaming has a lot of things going for it, but longevity of characters isn't normally one of them.
Later iterations have taken a wider view of how XP can be earned. Quick thinking, disabling traps, cunning plans and fast talking are also valid methods of gaining those cherished points. These are also open to abuse, of course, but it is a fairer system. It encourages players to build more varied characters good at more than one thing for a start. It encourages GMs and adventure writers to provide a buffet of challenges beyond killing things and taking their stuff.
Most games now allot XP equally to all players, regardless of the contribution they made to the encounter. The fighter who flubbed her diplomacy check at a crucial moment is not penalised any more than the cleric who failed to land a blow against the dragon. Equally unfair you may say, but so much depends on the dice - and we all have horrible rolling days. Or months, in my case.
Personally, I'm tending to bottle out of XP allocation altogether and decide when the players have done enough to gain a level. In a PbP that works out at an average of five enounters. In a table game, probably 9-10. Encounters being any kind of interactive situation.
That covers a multitude of sins, but allows me to reward creatively minded parties as well as the more mainstream groups. I currently have two parties traversing the Tomb of Horrors (the 4e version). One party are currently earning their XP in the traditional way by wiping out the denizens of a dungeon and surviving traps. The other group are prancing around Freeport with a brass band and a box of slaad eggs. Both are earning XP. They're just doing it in their own special ways.