You have 5 custom class slots to begin with in Call of Duty: Modern Warfare 2. If you want to unlock more, you’re going to need to be pretty decent at the game, because it means getting to level 70 in the online multiplayer mode several times… nine to be exact.
Every time you reach level 70 you gain access to prestige mode. Once you gain a prestige, you start back at level 1 and have to climb to the top again. At 1st prestige you gain a custom class slot, and then every 2 prestige after that, so you gain one at 1st, 3rd, 5th, 7th, and 9th prestige. At 9th prestige you have the max of 10 custom class slots.