The majority of fish kept in aquariums are tropical fish, which naturally live in waters with a temperature range of 22-28C although a few may live outside this range.
In a home aquarium the most common way of achieving a suitable temperature in this range is to use a heater-stat, which is a combined heater and thermostat. Modern heater-stats are adjustable and able to maintain a set temperature to within a degree, providing the room temperature is not at any extremes.
For most tropical fish, a temperature of between 24-26C is recommended. Some heater-stats work through the use of a component called a bi-metallic strip, which consists of two metal strips that bend depending on the temperature of the water, when they connect, a circuit is made and the heater is switched on. These styles of heater can occasionally malfunction, and the heater will be either stuck on the 'on' or 'off' position.
Some more advanced styles of heater-stat are controlled by electronic microchips, which, in the event of malfunction, always switch off, providing a safer option.
Before combined heater-stats were developed, it was commonplace to have a separate heater and thermostat connected by a cable. This method of heating can still be useful when used in larger aquariums where several heaters can be controlled by a single thermostat, providing a more equal distribution of heat.
Heating mats are also occasionally seen although these are designed for terrariums and do not provide an effective means of heating an aquarium filled with water.