How does the camshaft work?
A crankshaft works on the crank mechanism. A crank has crankpins and cranks which are connected with the connecting rods. It has a vibration damper that reduces the thrust on the crank.
For a better understanding, imagine your legs pedaling a bicycle. In this example, consider pedals as a connecting rod, and your legs are the pistons. As you paddling the piston, the reciprocating movement is converted to a rotary motion of the crankshaft.