A camshaft is a machine which turns rotational motion into vertical motion. Cams are usually imperfect circles which are arranged on a rod. They can also be perfect circles with the rod piercing through them in an off-centre position, like in the photo. When the handle is turned the cams rotate and force the wooden blocks to move up and down. The movement of the wooden blocks, and the slight slope on top of each one, causes the marbles to climb to the highest block on the camshaft machine. Once there is nowhere higher for them to go, gravity brings them down a ramp and back to the start again. If you were to continue turning the handle, the marbles would continue going up and back down again. This photo completes the pattern because the thing that they all have in common is rotation.