This law states that whenever there exists a current, a magnetic field circulates around it.
In a precise way, the law states, “for constant current flow, the flux of electrical current through a surface is proportional to the line integral of the magnetic field (counterclockwise) around its boundary”.
Ampere's law is the magnetic equivalent of Gauss's law (with a small difference) referring to a closed loop and the surface enclosed by it (rather than a closed surface and the volume enclosed by it, as is the case with Gauss's Law).
The sum over elements of the component of the magnetic field along the direction of the element, times the element length, is proportional to the current I that passes through the loop.
This law gives the magnetic field of a current carrying wire. This law helps us to calculate the magnetic field of a solenoid. It is shown how magnetism can be used to convert macroscopic mechanical energy to do microscopic electrical work.
Ampere's Law fails when applied to a circuit with a charging capacitor. This expression was extended by James Maxwell to cover the displacement current flowing through the empty space between the capacitor plates. This displacement current does not involve the motion of charge, but rather the rate of change of an E–field. Note that the displacement current between the plates is equal to the real current of moving charge flowing into the capacitor. Maxwell extended Ampere's law to include displacement currents.