If pipes are leaking, then that can be repaired.
If tank is rusted out and water escaping from the tank, then turn off the water plus power to the heater for safety, and then replace water heater.
Rusted water heater can be welded for repair, but remember that hot water is under pressure and tank can rupture any time.
Safest course if to replace heater.
Open following link for leaking water heater checklist:
http://waterheatertimer.org/Leaking-water-heater.html