An electric pool heater operates on the same principle as an electric hot water tank. Electric current heats a coil, which in turn heats the water. Compared to the ability of other energy sources, such as propane or natural gas, to heat water, however, it is a relatively slow process. And, considering the cost of electricity in most areas of the country, it is also an uneconomical choice.
A good use of electricity to heat a pool is through a heat pump. Like air conditioners, which transfer warm indoor heat to the outside, heat pumps transfer warm outdoor air to the water. The air heats the refrigerant, the compressor further heats the air, the air is eventually compressed into a very hot gas, and a heat exchanger transfers the heat to the pool water.
Because heat is not generated but rather transferred, the result is very efficient use of electricity. However, because heat pumps rely on transferring warm air to the water, they are largely ineffective during spring and fall in colder climates.