A camshaft is part of a vehicle's engine. It is used to open and close engine valves. It lets in air, while letting out exhaust gas. Here's how it works: the camshaft works with the crankshaft. The camshaft rotates at different speeds depending on if it is part of a 4-stroke or 2-stroke engine cycle. In a 4-stroke engine, the cycles are intake, compression, power, and exhaust. The crankshaft rotates once during every step. The camshaft rotates twice. Replacing a camshaft is fairly easy. Before you replace it, though, you should determine why it needs to be replaced as there might be bigger factors at play.