"XP" stands for "Experience Points". There are actually a number of different experience points that you accumulate in-game.
"Normal" XP are awarded for completing jobs, defeating bosses, fighting duels and wars, and fighting in empire wars. Your total accumulated determines your level. Whenever you earn normal XP, whichever lieutenant you have in the right hand seat also gains that same experience. The total experience they have accumulated since they were last combined determines their level.
"Class" XP are accumulated for the classes you have unlocked. They are awarded for defeating bosses as that class (as the predecessor class, for the tier II classes) and for fighting empire wars as that class. Your eight totals determine your level in each of the classes. See Level (Class) for more information.