During the cold winter months, it's not uncommon for pipes to freeze. While it's less common for water heaters to do so because they usually have hot water flowing through them, you might find yourself with a frozen water heater if you left the heater off for a long time while outside temperatures were below freezing. Be patient when thawing out your water heater; it's going to take some time.
Check if the water heater itself is frozen or if it's just the pipes leading in and out of the unit. This will often be the case. You can check by simply touching the water heater to find the spot where it's ice cold. Use a space heater or other heating element to apply heat indirectly to the frozen area until it thaws.
Look for burst pipes. Since water expands when it freezes, if there's not enough space inside the heater to accommodate that expansion, the pipes may very well have burst. That means that once the pipes thaw, you'll have a watery mess on your hands. Thus, it's a good idea to learn where your water shut-off valve is before defrosting the pipes of your heater.
Shut off the water or gas supply going to the water heater if you've determined that the entire unit has frozen over (if defrosting frozen pipes didn't get the heater working). Disconnect the unit and take it into a garage or other out-of-the-way area. That way, if it bursts as it thaws, you won't have a mess in the middle of your home.
Get the area warm so that the frozen water can melt. Turning on a space heater should do the trick.
Drain your water heater as the ice starts to melt. To do this, simply shut the water supply to the heater off, then open the small drain valve located near the bottom of the tank.
Allow air to get in the tank by opening either a hot faucet or an air release valve on the unit. This will allow water to flow out as it turns into liquid again.
Check the unit carefully to ensure that there are no breaks from the water expansion before connecting it back up for usage.
To avoid a repeat scenario, insulate your pipes or wrap them in electric heat tape. Also, avoid trying to thaw your water heater by simply turning it to its highest heat setting; homes have been known to catch fire when heating elements in water heaters overheated due to ice in the heaters.