A pump jack is a mechanical device used to extract crude oil from underground reservoirs by converting the rotary motion of a motor into the vertical reciprocating motion needed to drive a reciprocating pump inside the well. It is commonly used in onshore oil fields where the reservoir pressure is insufficient to push the oil to the surface naturally.