A camshaft is a rotating shaft that converts rotary motion into reciprocating motion. It uses a series of pointed or eccentric lobes, called cams, to operate engine valves, precisely timing their opening and closing. This mechanical heart orchestrates the flow of gases in an internal combustion engine.