The law of conservation of energy states that the total energy of an isolated system remains constant , it Is said to be conserved over time. This law means that energy neither be created nor destroyed ;Rather, it can only be transformed or transferred from one form to another form
If I put a battery (chemical potential energy) and wire it to a resistor, a light bulb, and a solenoid, I will get a transfer of the chemical potential energy (which is manifested as a electromagnetic voltage potential when the wires are connected) to electromagnetic (heat from resistor and light and heat from bulb) and kinetic (solenoid bounces) energy. If I lifted something with an engine hoist, I changed electromagnetic energy into gravitational potential energy.