The beam pump (like the beam engine) takes the rotary motion from the prime mover, and transfers it into a linear motion.
In the goldfields, a beam pump is one way that was used to pump water out of the mines (one of the disadvantages for mining below the water table). A steam engine makes a good prime mover, and a counterweighted beam pump can have a significant stroke to draw water up from the deep.
At Sovereign Hill there is a working beam pump which you could almost miss, given how big it is!
Should have gotten some video of the beam pump itself in operation – slowly shunting back and forth. I did have a closer look at the prime mover. The comparatively small size of the engine just goes to show how powerful steam engines can be.