Unit content
Ampère's circuital law
For steady currents, magnetic fields satisfy Ampère's circuital law:
$$\oint_C\mathbf B\cdot d\boldsymbol\ell=\mu_0 I_{\mathrm{enc}}.$$
The line integral follows a closed path $C$, while $I_{\mathrm{enc}}$ is the net current passing through a surface bounded by that path.
Orientation
The direction chosen around the loop and the positive direction of enclosed current are linked by the right-hand rule. Reversing one reverses the sign of the other.
Using symmetry
Ampère's law is most useful when symmetry makes the magnetic field constant in magnitude and aligned with the integration path.
For an infinitely long straight wire, a circular Amperian loop of radius $r$ gives
$$B(2\pi r)=\mu_0I,$$
so
$$B=\frac{\mu_0I}{2\pi r}.$$
Scope of the magnetostatic form
This form applies directly to steady-current situations. When electric fields change with time, Maxwell's displacement-current term extends the law so that it remains consistent with charge conservation.