If your water heater fails or is leaking, shut off the water supply immediately. Try to find the leak. It may be leaking at the drain valve connection at the bottom of the unit. It might also be normal discharge from the pressure relief valve on the top of the heater, which releases steam. However, if the leak is excessive, or the heater has completely failed, shut off the power or the gas valve, depending on what type of heater you have, and contact a plumbing professional. If the water heater failed due to a corroded tank, it's best to replace the unit. Ask your plumber to give you written estimate on equipment and installation costs.