Ampere's law is to magnetic fields as Gauss's law is to electric fields. We only use it in 3 cases, just like Gauss, and it even looks similar to Gauss's law, only it is a 1-D integral compared to a 2-D integral. A line integral, or to some a path integral, basically means we are looking for the magnetic field times the length of the path the B-field follows. This can work for us with long, straight wires with current, a solenoid, and a toroid. Check out how to apply Ampere's law in 2 of the 3 cases, those being a straight wire and toroid.