The Repair menu is accessed by a button on the bottom of your screen. When you open it, notice the Auto Repair checkbox. If you activate it, your robot will be repaired automatically upon returning to the garage after a battle.
Keep in mind, that if you lack the funds to repair ALL of the damage sustained, no repairs will be done automatically and you will have to fix your robot manually, by entering this screen.
Next to each module, you can see its individual repair cost. Clicking the Wrench button will repair this module only.
One thing to keep in mind is that even if your body is destroyed, the rest of your modules suffer no additional damage and you'll only have to repair the damage they've sustained up to this point.