The direction of the magnetic force on a moving positively charged particle or a wire carrying current $i$ in a uniform magnetic field is determined by the right-hand rules with different versions stated below.
Version 1 (right-hand rule): point the fingers of your right hand in the direction of $\vec v$ and curl them (through the smaller angle) toward $\vec B$. Your upright thumb shows the cross product $\vec v \times \vec B$ or the magnetic force $\vec F_B$. This force is perpendicular to the plane of $\vec v-\vec B$
Version 2 (right hand rule): point your fingers in the direction of $\vec B$ so that the thumb points toward the velocity $\vec v$, your palm shows the direction of the magnetic force on a positive charge.
Note: the magnetic force on a negative charge is in opposite direction to that given by the right-hand rule.
Example: What is the direction of the magnetic field that produces the magnetic force on a positive charge in each of the figures below. (assuming $B$ is perpendicular to $v$).
Solution: right-hand rule states that, to determine the direction of the magnetic force on a positively charged particle, point the thumb of the right hand in the direction of $v$, the fingers in the direction of $B$, and your palm in the direction of magnetic force $F$. Therefore, in the following figure we have
Where $\odot$ and $\otimes$ shows the direction of the fields as outward and inward, respectively, perpendicular to the page.