The piston engine is a metal block containing a series of round chambers or cylinders. The upper part of the engine block is usually an iron or aluminum - alloy casting. The casting forms outer walls around the cylinders with hollow areas in between, through which coolant circulates. The lower block provides a number of rigid mounting points for the crankshaft and its bearings. The lower block is referred to as the crankcase.
The crankshaft is a long, steel shaft mounted at the bottom of the engine and free to turn in its mounts. The mounting points (generally 4 to 7) and the bearings for the crankshaft are called main bearings. The crankshaft is the shaft which is made to turn through the function of the engine; this motion is then passed into the transmission/transaxle and on to the drive wheels.
Attached to the crankshaft are the connecting rods which run up to the pistons within the cylinders. As the air/fuel mixture explodes within the tightly sealed cylinder, the piston is forced downward. This motion is transferred through the connecting rod to the crankshaft and the shaft turns. As one piston finishes its power stroke, its next upward journey forces the burnt gasses out of the cylinder through the now-open exhaust valve. By the top of the stroke, the exhaust valve has closed and the intake valve has begun to open, allowing the fresh air/fuel charge to be sucked into the cylinder by the downward stroke of the piston. The intake valve closes, the piston once again comes back up and compresses the charge in the closed cylinder. At the top (approximately) of this stroke the spark plug fires, the charge explodes and another power stroke takes place. If you count the piston motions in between power strokes, you'll see why automotive engines are called 4-stroke or 4-cycle engines.
While one cylinder is performing this cycle, all the others are also contributing; but in different timing. Obviously, all the cylinders cannot fire at once or the power flow would not be steady. As any one cylinder is on its power stroke, another is on its exhaust stroke, another on intake and another on compression. These constant power pulses keep the crank turning; a large round flywheel attached to the end of the crankshaft provides a stable mass to smooth out the rotation.
At the top of the engine, the cylinder head(s) provide tight covers for the cylinders. They contain machined chambers into which the fuel charge is forced as the piston reaches the top of its travel. These combustion chambers contain at least one intake and one exhaust valve which are opened and closed through the action of the camshaft. The spark plugs are screwed into the cylinder head so that the tips of the plugs protrude into the chamber.
Since the timing of the valve action (opening and closing) is critical to the combustion process, the camshaft is driven by the crankshaft via a belt or chain. The valves are operated either by pushrods (called overhead valves - the valves are above the cam) or by the direct action of the cam pushing on the valves (overhead cam).
Lubricating oil is stored in a pan or sump at the bottom of the engine. It is force fed to all the parts of the engine by the oil pump which may be driven off wither the crank or the cam shaft. The oil lubricates the entire engine by travelling through passages in the block and head. Additionally, the circulation of the oil provides 25-40% of the engine cooling.
If all this seems very complicated, keep in mind that the sole purpose of any motor - gas, diesel, electric, solar, etc. - is to turn a shaft. The motion of the shaft is then harnessed to perform a task such as pumping water, moving the car, etc. Accomplishing this shaft-turning in an automotive engine requires many supporting systems such as fuel delivery, exhaust handling, lubrication, cooling, starting, etc. Operation of these systems involve principles of mechanics, vacuum, electronics, etc. Being able to identify a problem by what system is involved will allow you to begin accurate diagnosis of the symptoms and causes.