This is one of the most difficult topics, but, speaking in a generally accessible language, it all comes down to opening and closing the inlet and outlet valves of the motor in strict accordance with the movement of the piston. This alignment is ensured by the profile of the cams, the gaps between them and the valve stems (and of course, the rigid mechanical connection of the cam shaft with the crankshaft).
Engine designers have long understood: the traditional gas distribution mechanism can never work perfectly in the entire rev range of the crankshaft. After all, his task is akin to a centrifugal ignition timing controller: the faster the engine spins, the earlier it is necessary to set fire to the mixture so that it has time to “flare up”. Here we are talking about filling the cylinder with a fuel mixture and removing exhaust gases. The devices used to adjust the valve opening and closing times (and sometimes their lift heights!) In modern engines are quite diverse and contain sophisticated precision mechanical devices that make the whole car more expensive. But the game is worth the candle: not only ecologists, but also drivers are satisfied with the result. Such machines differ, as a rule, noticeably better traction at low speeds, which accelerates acceleration and eliminates frequent gear changes. From this point of view, it is more important to control the inlet valves, and the movement to excellence intervenes in the work of the exhaust valves already in the “second stage”. And the movement is pretty fast. If twenty years ago, the entire phase adjustment was reduced to switching between two fixed angles of the cam shaft, today the valve opening control is so flexible that sometimes you don’t need … a throttle.