There are a number of pistons inside an engine depending on the design, 4 to 12 cylinders usually. The pistons are connected to a crankshaft through a connecting rod. Pistons fire consecutively to rotate the crankshaft inside the engine block. The oil pump pushes oil through the oil filter and then supplies oil to vital engine parts including the crank and camshaft, cylinder walls and piston rings, valve train, cam lifters and the timing gears or chain. Motor oil is used to lubricate and cool internal engine parts. Oil is pumped up through the engine, then returns to the bottom of the engine and is gathered in the oil pan.
Over Head Camshaft Engine - 4 Cylinder (courtesy of beaudaniels.com)
The cylinder head is connected to the top of the engine block and allows air/fuel mixture and exhaust into and out of the cylinder block. The cylinder head has the duty of holding the air/fuel mixture charge inside the cylinder as it combusts, forcing the piston downward. The cylinder head is connected to the engine block using head bolts, using a head gasket to seal both parts.Over Head Cam Cylinder Head
A camshaft is used to open and close intake and exhaust ports by using valve train components. These components will vary depending on the design of the engine. There are primarily two styles of valve systems: over head cam which consists of a camshaft and lifter, and the in block system which consist of a camshaft, lifter, push rod, rocker arm. Both styles utilize a valve spring to hold the valve closed.