The camshaft is an apparatus used in piston engines to operate poppet valves. It consists of a cylindrical rod running the length of the cylinder bank with a number of oblong lobes or cams protruding from it, one for each valve. The cams force the valves open by pressing on the valve, or on some intermediate mechanism, as they rotate.

The relationship between the rotation of the camshaft and the rotation of the crankshaft is of critical importance. Since the valves control the flow of fuel intake and exhaust, they must be opened and closed at the appropriate time during the stroke of the piston. For this reason, the camshaft is connected to the crankshaft either directly, via a gear mechanism, or indirectly via a belt or chain called a timing belt or timing chain. In some designs the camshaft also drives the distributor and the oil and fuel pumps. Also on early fuel injection systems, cams on the camshaft would operate the fuel injectors.

In a two-stroke engine that uses a camshaft, each valve is opened once for each rotation of the crankshaft; in these engines, the camshaft rotates at the same rate as the crankshaft. In a four-stroke engine, the valves are opened only half as often; thus, two full rotations of the crankshaft occur for each rotation of the camshaft.

Depending on the location of the camshaft, the cams operate the valves either directly or through a linkage of pushrods and rockers. Direct operation involves a simpler mechanism and leads to fewer failures, but requires the camshaft to be positioned at the top of the cylinders. In the past when engines were not as reliable as today this was seen as too much bother, but in modern gasoline engines the overhead cam system, where the camshaft is on top of the cylinder head, is quite common. Some engines use one camshaft each for the intake and exhaust valves; such an arrangement is known as a double or dual overhead cam (DOHC), thus, a V engine may have 4 camshafts.

Valve timing gears on a Ford Taurus V4 engine — the small gear is on the crankshaft, the larger gear is on the camshaft. The gear ratio causes the camshaft to run at half the RPM of the crankshaft.

The rockers or cam followers sometimes incorporate a mechanism to adjust and set the valve play through manual adjustment, but most modern auto engines have hydraulic lifters, eliminating the need to adjust the valve lash at regular intervals as the valvetrain wears.

Sliding friction between the surface of the cam and the cam follower which rides upon it is considerable. In order to reduce wear at this point, the cam and follower are both surface hardened, and modern lubricant motor oils contain additives specifically to reduce sliding friction. The lobes of the camshaft are usually slightly tapered, causing the cam followers or valve lifters to rotate slightly with each depression, and helping to distribute wear on the parts. The surfaces of the cam and follower are designed to "wear in" together, and therefore when either is replaced, the other should be as well to prevent excessive rapid wear. In some engines, the flat contact surfaces are replaced with rollers, which eliminate the sliding friction and wear but add mass to the valvetrain.

In addition to mechanical friction, considerable force is required to overcome the valve springs used to close the engine's valves. This can amount to an estimated 25% of an engine's total output at idle, reducing overall efficiency. Two approaches have been tried to reclaim this "wasted" energy but have proven difficult to implement:

  • Springless valves, like the desmodromic system employed today by Ducati
  • Camless valvetrains using solenoids or magnetic systems have long been investigated by BMW, and are currently being prototyped by Valeo and Ricardo