We know that electricity is generated in generators.
The electricity that reaches our homes is A.C.
Changing the magnetic field creates electricity so as we spin a rotary in the generator using any other mechanical force, we disturb the magnetic flow of the magnets placed beside them, which then creates electricity.
Electricity flows in the direction according to the right-hand rule.
If the direction of motion or the direction of the magnetic field changes, that means the direction of electricity will also change.
When we move an electric conductor through a magnetic field, the magnetic force pushes the free electrons in the conductor to move, which generates electricity.
This is the right-hand rule, it is shown how to use this below.
In this image, we can see that we can find the direction of current using the right-hand rule, but we need the direction of motion and magnetic field. We just need to align our hands according to the direction of these factors.