Basically, bad conductors of electricity cause the conductor to get hot when higher currents are drawn.. This is a safety hazard for most wiring applications.
But , when properly designed a heating element powered by electric current can safely produce electric heat.
Well, electricity cannot generate heat, however, can make the objects warm as it does with a water heater. A water heater warms water with the help of electricity. However, constructing a machine which would warm water with the help of electricity is a little complex and is not safe to try it at home as you can get an electric shock.
Electricity is passed through conductors such as metal wires. When metal wires are moved constantly in a magnetic field, electricity is produced and passes to the transmitter through the wires. Electricity is produced when the atoms in the metal conductor get very excited and the electrons start going from one atom to another. When this happens, an ample amount of heat and light is generated. This is why a light bulb is bright and hot when you touch it.