Levelling up Mario in Paper Mario: The Thousand-Year Door works like any other RPG. You gain enough experience (Star Points here), and eventually he’ll become more powerful. Your partners, on the other hand, need a bit of extra love.
If you are unable to level up your partners, you’ll find they quickly become a liability. While you can keep Mario out front to be the primary target for enemies, some attacks will hit both your party members, and take them down quickly. So, you’ll need some way to make them hardier, and badges only go so far.
To level up your partners, you need Shine Sprites. If you’re familiar with Super Mario Sunshine, these are what you collect to advance in the game. They look like suns, essentially. In Paper Mario: The Thousand-Year Door, they come in boxes you need to bop to collect.
Each partner upgrade requires three Shine Sprites. Once you have three, you need to go to Merlon in East Rogueport (the house right next to Professor Frankly). Talk to him, and he’ll allow you to apply those Shine Sprites to one of your partners.
Leveling up a partner increases their HP and will teach them a new move. Now they’ll be able to keep up in battle.
How to level up a partner a second time
At first, you’re only going to be able to level up a party member once in Paper Mario: The Thousand-Year Door. However, they can be leveled up again later if you first find a special item.
Right before (or during) Chapter 6, you can speak with Merlon who will give you a clue that points you back to Hooktail Castle. If you return to the room with all the spikes, you can find a wall on the far side with a crack in it. Blow this up with Bobbery’s ability and you’ll find a room with the “Up Arrow” in it.
Take the Up Arrow back to Merlon, and he’ll then be able to upgrade your partners a second time. This requires an additional three Shine Sprites. Leveling up your partner a second time provides them with more HP and another skill.
That’s as far as you can upgrade them, though you can still make them more powerful through the use of badges.