Maintaining a stable temperature in your aquarium is very important for the health of your inhabitants. Most tropical fish will be comfortable between 76-78 degrees. To maintain that temperature, you use an aquarium heater. There are three main types of aquarium heaters: undertank heaters, undergravel heaters, and glass submersible heaters.
Undertank heaters are heating pads that go under the glass of the tank and heat from the outside. These types of heaters are inefficient because they have to heat through the glass, and glass is a poor conductor of heat.
Undergravel heaters are heating cables that are buried under the aquarium substrate. You would not want to use undergravel heater if you plan on keeping fish or invertebrates that like to dig.
The most popular type of aquarium heaters are the glass submersible type. These heaters go inside the tank, against the back wall. Some include suction cups to keep them in place. Never let these heaters run outside of water. If they are run out of water, there is a good chance they will shatter.
When buying a heater, keep in mind you will need 3-5 watts per gallon of heating. For example, a 30 gallon fish tank in a cold climate would need 150 watts worth of heaters. However, rather than get one 150 watt heater, I strongly recommend two 75 watt heaters.
When heaters break they either stick on or off. If you only have one heater, either of those scenarios would be a disaster. If the heater stuck in the on position, it would continue heating until you had cooked fish. If it stuck in the off position, your tank would quickly cool down. However, with two smaller heaters, if one of them sticks on it wouldn't heat up the tank nearly as fast, or as hot, and if it sticks off, the other heater is there to maintain the temperature until you realize it failed.