The function of the crankshaft is to translate the linear reciprocating motion of a pistons into the rotational motion required by the automobile. This is accomplished by connecting the pistons to the crank throws, which are offset from the central axis of the crankshaft to create a rotation about that axis.
Each crankshaft is designed for a specific engine. Using the example of a four-stroke engine, the crankshaft has four crank throws for connecting the four pistons and is generally connected to the flywheel. During the combustion cycle of the engine, these crank throws act as a lever arm for the piston to push, thereby creating rotational motion. This is similar to pushing on the end of a wrench when turning a bolt. When the crankshaft completes its rotation, the crank throw will return the piston to the top of its cylinder.
In addition to the crank throws, the crankshaft is also comprised of carefully designed weights and balances to reduce engine vibration. Either end of the crankshaft is connected to the engine block by the crank bearings. To smooth out the power delivery of the engine between the combustion cycles of the pistons, a fly wheel is also incorporated onto the crankshaft.