The right-hand rule is a notation convention for vectors in 3 dimensions. It was invented for the use in electromagnetism by British physicist in the late 19th century . Today, the right-hand rule has many applications in mathematics and physics.
When dealing with three vectors that much be at right angles to each other, there are two distinct solutions. Therefore when expressing this idea mathematically, one much remove the ambiguity of which solution is meant. There are variations on the right-hand rule depending on the context. All variations are related to the one idea of choosing a convention.
One form of the right-hand rule is when ordered operations must be performed on two vectors a and b that has a result which is a vector c perpendicular to both a and b. For example a vector cross product. The finger assignments for this are as followed: the first (index) finger represents a, the first vector in the product, the second (middle) finger, b, the second vector; and the thumb c, the product.
A different form of the right hand rule is called the right-hand grip rule. It is used in situations where a vector must be assigned to the rotation of a body, a magnetic field or fluid. The finger assignments for this forms is as followed: AN electric current passes through a solenoid resulting in a magnetic field; wrap your right hand around the solenoid with your fingers in the direction of the conventional current, your thumb points in the direction of the magnetic north pole. This method can also be used to determine the torque vector direction.
 Fleming, John Ambrose (1902). Magnets and Electric Currents, 2nd Edition. London: E.& F. N. Spon. pp. 173–174.