Meaning: His legs are moving up and down quickly like the pistons in an engine.
Choice of Words: "Pump" means to move something up and down or in and out. "Legs" are the limbs used for walking or running. "Pistons" are parts of an engine that move up and down to create power.