Right-hand screw rule
The right-hand screw rule, also known as corkscrew rule, associates the direction of an electric current with the direction of the magnetic force lines circling the current, see Ampère's law.
By convention, an electric current runs from positive to negative voltage (in a direction opposite the actual flow of the—negatively charged—electrons). The magnetic field points toward the North pole, i.e., a compass needle will align itself along (be tangent to) the green magnetic field line in the figure, pointing in the same direction as the green arrow.
The corkscrew rule is depicted in the figure, where the corkscrew is rotated downward into the cork. When the electric current runs straight downward through the center of the corkscrew, the magnetic force lines are directed along the green line shown in the photograph.