Dear student,
The rule used to find the direction of magnetic field produced around a straight conductor carrying current is Maxwell's right-hand thumb rule. It states that if the thumb of your right-hand is pointing along the direction of the current, then your remaining fingers of the same hand which are curled up, indicate the direction of the magnetic field due to the current. When the thumb’s position is upward, the curled fingers will be anti-clockwise, and so will be the magnetic field, and vice versa.
Regards.