An engine is a machine whichburns fuel and delivers useful work. To dothis, air and fuel enters through camshaftcontrolled inlet valves, burns and theexpanding gases force the piston, which isbelow the valves, to move down in thecylinder bore. This motion is transferred tothe crankshaft, below the piston, which isconnected to it by the connecting rod, andthis drives our cars. The burnt gases areexpelled by the exhaust valves and the cyclerepeats. This is the simplest form of anengine, a single cylinder, think 100cc bikeson Indian roads.
There is a limit to how fast a singlecylinder engine can run, and installing abigger piston (more weight) for more powerworks only up to a point. To extract moreuseful work we can add one more cylinder inparallel, for example. Two smaller pistonswill turn faster than a large one and we canget more power, this is a parallel twin (like inthe Ninja 250R). If we keep adding morecylinders we get Triples (Triumph), Fours(most hatchbacks), Fives (Volvo S60 D5),Sixes (BMW 335i), but straight-eights are veryrare now because they consume a lot ofspace. Advantage of straight engines is thatthey are easy to manufacture and maintain,eager to rev, they tend to deliver more powerat higher revs, and camshaft and valve trainsare of simple design.
But tacking on cylinders in a line meanslots of space is required - there are alternativecylinder arrangements. If we join two ofthem at an angle opposite each other, we geta V-twin, think Harley-Davidson. If we jointhem exactly opposite to each other suchthat they form a straight line, we get Boxers,think BMW R1200GS (two cylinders) andPorsche 911s (six cylinders).
Advantage of Vs and Boxers is that, theyare compact, engine vibration is balancedout by opposite bank of cylinders, fuel andair induction equipments are accommodatedbetween the opposite banks ofcylinders, hence efficient packaging. In thesame vein, we have V4s (think VFR 1200F),V6s (Audi 3.0 TFSI ), V8s (458 Italia), V1Os(Gallardo), V12s (Enzo) and V16s (CadillacV-16). But again, V16s are rare. Volkswagen,then went on to join two V6s such as toshare a common crankshaft and we got aW12 (think Continental GT), advantagebeing the power of 12 cylinders in almostthe length of a inline triple. Space is,obviously, not the only consideration andengine formats are chosen for their nature,especially in the faster cars and motorcycles.V-twins make loads of torque, V4sfind a great balance between torque andhigh-rev power, inline-fours typically likerevving fast and high, sixes (inline and V6s)can be tremendously smooth while V8s arefamous for their brilliant sound as well asgreat power and smoothness and so forth.
That in a nutshell, is the internalcombustion engine in basic structure andconfiguration.