The camshaft of a Mazda MX5 NA (1989 - 1997) controls the valves that allow air and exhaust gases to flow through the engine. This determines when the cylinders are filled and emptied. This timing is controlled through the timing belt that synchronizes the camshaft and crankshaft in the engine, which is essential for proper combustion.