Shafts are mechanical components that transmit power or motion between different parts of a machine. They are typically cylindrical and rotate around a fixed axis, playing a crucial role in converting linear motion into rotational motion or vice versa, thereby enabling various mechanical operations and functions.