The health bar can be VERY confusing at first - especially since there's a little red "thermometer" bar beneath your health area which seems to BE a health bar.
First off, your total current health is represented by the diamond shape in the top center of your screen. The diamond has four pieces to it. As you get stronger and gain more maximum health, you get more diamond pieces. You start with just one diamond - but as you go through the game you can gain up to **20** diamonds. So you are very, very weak at the beginning!
Your diamond pieces start out filled in. That means they are "full of health". If you get hit once, one of those diamond pieces will go hollow. That means that health was lost. You can regain health by finding blue glowing spheres around the game level. Hitting one will cause the blue bits to fly to you, replenishing a health bar.
The red horizontal thermometer just beneath those diamonds is your "gain towards another health piece". It fills up as you kill enemies using any weapon. When it fills up totally, you earn yourself another health piece, and it starts over again. So it is VERY much in your best interest to kill every enemy possible and build your health up quickly.
In addition, you find nano-health upgrades in certain spots during the game. These instantly add another health bar to your health meter. Note that these do NOT affect your thermometer progress.
Ratchet and Clank 2 Going Commando Walkthrough