What is a camshaft?
For an internal combustion (IC) engine to operate, all of its components must perform their functions at very precise intervals in relation to the motion of the piston. To accomplish this, a component called a camshaft is used. The below image shows a camshaft and camshaft drive gear.
Note: Camshafts are usually installed on four stroke engines and very large two stroke engines only.
A camshaft is a long bar with egg-shaped eccentric lobes (cam lobes), one lobe for each valve and fuel injector (if engine does not have a common rail fuel injection system). Each lobe has a follower. As the camshaft is rotated, the follower is forced up and down as it follows the profile of the cam lobe. The followers are connected to the engine's valves and fuel injectors through various types of linkages called pushrods and rocker arms. The pushrods and rocker arms transfer the reciprocating motion generated by the camshaft lobes to the valves and injectors, opening and closing them as needed. After the valves have been forced open by the rocker arms, the valves are again closed by springs.
Engine Valve Train (Pushrods, Valves, Valve Springs, Camshaft)
Valve Train
As the valve is opened by the camshaft, it compresses the valve spring. The energy stored in the valve spring is then used to close the valve as the camshaft lobe rotates out from under the follower. Because an engine experiences fairly large changes in temperature (e.g., ambient to a normal running temperature of about 190°F), its components must be designed to allow for thermal expansion. Therefore, the valves, valve pushrods, and rocker arms must have some method of allowing for thermal expansion. This is accomplished by the use of valve lash. Valve lash is the term given to the "slop" or "give" in the valve train before the cam actually starts to open the valve.
Idler and Timing Gears
The camshaft is driven by the engine's crankshaft through a series of gears called idler gears and timing gears. The gears allow the rotation of the camshaft to correspond with the rotation of the crankshaft. The gears thereby allow the valve opening, valve closing, and injection of fuel to be timed to occur at precise intervals in the piston's travel. To increase the flexibility in timing the valve opening, valve closing, and injection of fuel, and to increase power, or reduce cost, an engine may have one or more camshafts. Typically, in a medium to large V-type engine, each bank will have one or more camshafts per head. In the larger engines, the intake valves, exhaust valves, and fuel injectors may share a common camshaft, or, have independent camshafts.
Number and Location of Camshafts
Depending on the type and make of the engine, the location of the camshaft or shafts varies. The camshaft(s) of an in-line engine is usually found either in the head of the engine, or in the top of the block running down one side of the cylinder bank. On small or mid-sized V-type engines, the camshaft is usually located in the block at the center of the "V" between the two banks of cylinders. In larger or multi-cams V-type engines, the camshafts are usually located in the heads.
Single Camshaft (Cam) for V-Type Engine
Additional Resources
https://en.wikipedia.org/wiki/Camshaft
https://auto.howstuffworks.com/camshaft.htm
https://energyeducation.ca/encyclopedia/Camshaft