If the right hand is wrapped around the wire so the thumb points in the direction of the current (conventional current, flow of positive charge), the fingers will curl around the wire in the direction of the magnetic field.
The above rules can be generalized to give the modern vector form of Ørsted's law[2][6] The line integral of the magnetic field
passing through any surface bounded by the curve.Ørsted's law only holds for steady currents, which don't change with time.
It can be seen that it fails for time varying currents by considering the case of a circuit consisting of a battery charging a capacitor through a resistor.
It can be verified experimentally that the current in this circuit creates a magnetic field, yet any closed curve encircling the conductor can be spanned by a surface passing between the capacitor plates, through which no current passes, from which the equation would give zero magnetic field.