A camshaft is a critical engine component that controls the opening and closing of valves, ensuring proper air-fuel intake and exhaust timing for optimal engine performance.