Simple.
They have pistons arranged in a circular fashion around a shaft that has "bent ring" type thing on it. The pistons have a notch in then that the ring fits into. As they fire and move up and down they move this ring and cuase the shaft to spin.
