So besides Spock..
That must be a combustion engine.
When the piston reciprocates some of the exhaust pressure is diverted into that thing what looks like two spheres on a pole. Those spheres get filled with exhaust gases and then that pressure raises the arms which pulls the cable that feeds more gas to be combusted again.
That’s what it looks like