Electric energy is made of a movement of any electrons from the conductor with more potential energy to the conductor with less potential energy that are both connected.
When you rub two amber bar with fur and put one of them near the other. You can see one bar reject the other.
When you rub a glass bar with silk and a amber bar with fur you put one of them near the other. You can see these bars are attracted.
This is because each object in the universe is made of many atoms and each atom is made of protons (positive charges), electrons (negative charges), neutrons (neutral charges)
In normal state a general object have the same number of protons and electrons but when you rub an object with another the external charges of one of them is moved to the other and vice versa and then the number of the electrons is not homogenous and it is electrified.
The material with excess of the charge (such as electrons) makes an electric field that produces some electrostatic forces with the other object placed closed to him, these are attractive if both material have the same excess of the charge or repulsive in the other way.
Amber has a negative polarization, Glass has a positive polarization for this reason they are rejected.
The movement of the electrons produces electricity that is the variation of the electric charge in the time: I=dq/dt but how is possible to move these electrons?
To make the movement of electrons is enough that there is a connection between one conductor that has more electrons than protons and one conductor with more protons that electrons.
In this case the state of the conductor that is made by the union of two precedent conductors is instable and it has a potential difference between the conductor with excess and electrons and the conductor of excess of protons.
The potential difference causes the movement of electrons from the conductor that has them in excess to the other and there is electricity. These electrons are moved until there is an homogeneous distribution of them in each part of the material.
The generator has always a not homogeneous distribution of electrons and is always instable for this reason it produces always energy.
- generator causes the different distribution of electrons between two conductors (in one material they are in excess in the other material they are in minority)
- this different distribution causes a potential difference between the conductor with excess of electrons and the other. This potential difference is measured in volt.
- This causes the movement of the electrons from the conductor with excess of electrons to the other and produces the electric current
- At the end of the movement of the electrons there is a uniform distribution of electrons in both the conductor and there is not movement of electrons (current)
- Then the generator reverses the polarity and this causes a difference of distribution of electrons and this cycle is repeated
If you approach the compass at a thread with electricity you can see that the needle is moved because electricity generates a magnetic field because electric field and magnetic field are related.
The electricity used in our houses is provided by power plants, there are three types of them: hydroelectric, thermoelectric, nuclear, all of them perform a lot of transformation that causes the movement of a turbine that provide a mechanics energy that is converted into Electricity.
For example in hydroelectric power plant the water flows, this makes the movement of a special wheel that makes a kinetics energy like the dynamo of a bike.
Below there is an example of AC generator that converts mechanical energy to alternate current