It is unfortunate that the physics of magnetism got saddled with several different *-hand rules, and that they use different hands. Let's pull them apart:
Fleming's left-hand rule
gives you the direction of the force that acts on a current if you know the magnetic field.
Image source
This rule applies to motors, i.e. devices which use currents in a magnetic field to generate motion. It derives its validity from the Lorentz force,
$$
\mathbf F=q\mathbf v\times\mathbf B,
$$
in which the current goes with the charge's velocity and the induced motion is along the direction of the force. This is why this rule coincides with the left-hand rule used in cross-products in general.
Fleming's right-hand rule
is much less used in physics (though I can't speak for how engineers do things). It applies to generators, i.e. devices which use motion in a magnetic field to generate currents. This again relies on the cross product in the Lorentz force, except that now the charge's velocity is given by the object's motion, and the force along the wire is what establishes the current. This means you've swapped the middle finger with the thumb with respect to Fleming's left-hand rule, which you can do by keeping the (vague) assignments to 'motion' and 'current' and switching hands.
Image source
I dislike this convention very much and I would encourage you to forget all about it except the fact that it exists and should be avoided. In any situation where you need it, you can simply use the Lorentz force to figure out which way the current will go.
Ampère's right-hand rule
is quite different, and it gives you the magnetic field generated by a straight wire.
Image source
It derives its validity from the Biot-Savart law, which gives the magnetic field at position $\mathbf r$ generated by an infinitesimal current element of current $I$ and directed length $\mathrm d\mathbf l$ at position $\mathbf r'$, as
$$
\mathbf B(\mathbf r)=\frac{\mu_0}{4\pi}\frac{I\mathrm d\mathbf l\times(\mathbf r-\mathbf r')}{|\mathbf r-\mathbf r'|^3}
$$
Again, it is the cross product which dictates the direction of the field, and you should check by yourself that it works out as indicated in the picture.
As you can see, the rules are quite different. It is therefore crucial that, if you want to use them as mnemonics, you learn correctly which one applies where, and that you apply them correctly. (It is no use to learn which hand to use if you e.g. swap the assignments for the index and middle finger.)
The most important thing to learn, though, is the Lorentz force law, which is based on a left-hand rule (charge-times-current on your middle finger, field on the index, force on the thumb) indicated by the cross product. This is essentially failsafe if you apply it correctly and is less subject to confusion with other rules.
The fact that Fleming's is a left-hand rule is an artifact of the completely arbitrary choice of the right-hand rule to define the direction of the magnetic field. If electromagnetic induction had been discovered by people who put South at the tops of their maps, we might well define the direction of a cross product using the left hand instead of the right. Since every prediction of an acceleration in electrodynamics involves an even number of right-hand rules, and complete and consistent switch to the left hand would be mathematically identical.
That said, Fleming's rule is a consequence of the Lorentz force between the fields and currents in the motor (or generator).
Best Answer
The short explanation is that it works by convention. In other words, there are quantities that are unambiguous and everyone agrees on, like forces and velocities1. The magnetic field is, believe it or not, not one of those. The force produced by a magnetic field is calculated using the right hand rule, which seems arbitrary. The important part, though, is that we calculate the magnetic field using the same arbitrary right hand rule. Interestingly, when used in pairs like this, the arbitrary nature of the right hand rule cancels out.
In algebra, we say that the magnetic field of a wire is proportional a current by $$\vec{B}=\frac{\mu_0 I}{2\pi r} \left(\hat{I}\times\hat{r}\right),$$ where $\hat{I}$ points in the direction of current flow and $\hat{r}$ is perpendicular to the wire and points from the wire to the point we're measuring the magnetic field at. Rather than work out what direction that is, let's drop this into the Lorentz force law \begin{align} \vec{F}&=q\vec{v}\times\vec{B}\\ &=q\frac{\mu_0 I}{2\pi r} \vec{v}\times\left(\hat{I}\times\hat{r}\right) \\ &=q\frac{\mu_0 I}{2\pi r}\left[\left(\vec{v}\cdot\hat{r}\right)\hat{I}-\left(\vec{v}\cdot\hat{I}\right)\hat{r}\right]. \end{align} All of the cross products, and accompanying arbitrary right hand rules, have vanished!
1. Note that there is actually an arbitrariness in the definition of velocities and forces. We draw velocities as pointing from where the object was and to where it will be, but we could have chosen the opposite convention and not much would have worked out differently, just some minus signs being shuffled around. Similarly, we could have chosen the opposite convention for forces.