Cliff notes:
When you drill, you are fighting the pressure of the oil/gasses under the surface. To help equalize the area that is tapped (Drilled into), mud is injected into the well to help keep it steady.
A pressure kick can happen which is just when a bubble of pressure comes up near the well head and puts more pressure on the BOP (Blow out preventer). The BOP allows the guys up top to inject more brine or mud to mitigate and bring the kick down to a controllable pressure.
once the well is stable, concrete is injected into the well to "cap" it off. once that seats and seals, they can back off a bit to test it to see if it holds. Most times, the first pour does not seal, so a squeeze is put on and more stuff is injected.
A second pour occurs and if all goes well, it holds and everything is removed. Boom, a well is now capped off and they know it produces....
that allows BP to come back later and re-tap and open valves for it to produce.