Air is surprisingly heavy stuff. The air under an average coffee table weighs about 1kg, which means when we push large quantities of it through the small pipes of an engine at high speed it has a significant amount of momentum.
Engines breathe in huge quantities of air, each 100bhp consumes about 35 pints of air per second and expels about three times that volume in exhaust gas. All this flow needs to be carefully controlled, the flow into the cylinders is not constant but stops and starts many times a second with each cycle, inertia has to be allowed for so that enough time is available for the gas to speed up or slow down.
This is all achieved with the camshaft, a long steel rod with lumps on that pushes the valves up and down. It's spun round in synchronisation with the crank and pistons so that the lumps, called lobes, hit the top of the valve stems via the follower or other links and force them open at just the right moment. The valve is gradually opened and shut to avoid excessive forces which would increase wear.
Because it takes time for the air to get moving the cam opens the intake valve before the piston starts the intake stroke (I'll come back to this situation later), as the piston draws the air in the speed increases and gains momentum, then when the piston is at the bottom of the stroke and starts coming up the momentum continues to force air in whilst the valve gradually shuts. So rather than the intake valve being only open for the 180 degrees of the intake stroke, it is more usually open for over 230 degrees in total.
After it shuts and the compression stroke is followed by the expansion stroke it becomes time to open the exhaust valve, but again rather than waiting for the power stoke to finish and the exhaust stroke to start the exhaust valve is actually opened a bit early. Near the end of the power stroke very little useful power is being transmitted to the crank, the exhaust is opened and gradually exhaust gas speed increases. Initially the exhaust gas is forced out by combustion pressure, but as the piston travels up on the exhaust stroke it pushes the remaining exhaust gas out, further increasing momentum. Near the top of the stroke there is still enough gas momentum to drag the remaining exhaust gas out of the chamber even as the piston starts going back down on the intake stroke. The exhaust valve is then gradually closed.
This does mean that there is a period at the end of the exhaust stroke and the beginning of the intake stroke where both the intake and exhaust valves are open, the exhaust momentum prevents it going the wrong way and even helps to drag fresh intake air into the cylinder. This situation is referred to as valve overlap.
Matching cam timing to the valve size and port diameter is vital, big valve/port engines have lower gas speeds, less momentum and during the overlap phase the exhaust gas can reverse direction and flow into the intake more easily at low engine speeds, but at high engine speeds a big valve head with a large overlap phase can make the engine breathe in much more air than it would normally do, effectively the gas momentum cramming more intake charge in just like a supercharger does.
That is why race engines can make so much more power than road engines, but struggle to idle smoothly and can be unpleasant to drive at light throttle.
Cams are generally referred to by the total duration the valve is open for in degrees, most cams have the same duration for the intake and exhaust, but some race cams may use different amounts, particularly on turbo or supercharged engines. A standard cam may have a duration of 240 to 260 degrees, a sporty road cam might have about 275 to 285 degrees, but a full bore race cam could keep the valves open for as much as 310 degrees, although that probably wouldn't idle below 4000rpm!
The cam designed is a complex subject but the design has a massive effect on how well the engine breaths, many tuning companies offer performance cams sold as 'Stage 1' etc., but there is no technical definition of a 'Stage' and this is simply a marketing term, one company's stage 1 cam might be equivalent to another companies stage 3.
The cams are driven by either a chain or a toothed belt that is driven by the crank so everything is synchronised. The crank has to go round twice for the pistons to do all four strokes on a 4 stroke engine, so the cams are driven at half the speed of the crank, this is done by having the cog on the crank half the size of the cogs on the cams. A very small number of engines use a series of gears instead of a belt or chain, one example being the old Rolls Royce V8, which has the advantage of never needing replacement and maintaining accurate timing under all conditions, the down side is that it is heavier and more expensive.
Adjustable 'Vernier' pulleys are available to fine tune the timing on race engines, these have two parts; one is the outer cog driven by the chain or belt and the other part is the inner mounting hub onto the camshaft. A ring of bolts join the two halves together, each bolt passes through a slotted hole so that the two parts can be rotated slightly with respect to each other. A typical cam gear, known as a sprocket, may have teeth separated by 10° so fitting the chain either one tooth ahead or behind adjusts timing by 10° either way, fitting a vernier cam wheel allows finer adjustment adjustment within that 10°. Retarding the cam by a few degrees can increase low speed torque at the expense of high rpm power, advancing it a few degrees has the opposite effect.
A good tuning company balances the intake dimensions, exhaust manifold and systems, port and valve sizes with the right cam type and setting just the right cam timing to achieve the desired characteristics. There is a lot more to cams than just a stick with lumps on.