Once upon a time, cars were driven by the rear wheels. This was out of necessity: there was no easy way to make the drive-shafts bend enough to go round corners.
Robert Hooke's Solution
The problem of allowing rotating shafts to deviate slightly from the straight and narrow had been solved in the 18th Century by Robert Hooke (who also invented the Newtonian telescope, designed London's Monument and the dome of St Paul's Cathedral, and conceived the grid plan on which most US city streets are laid out).
A Hooke's Joint is a fairly simple device to understand. Take a standard six-sided die and hold it by two opposing faces between the first finger and thumb of your left hand. Now take your right hand and grasp another two opposing faces between thumb and forefinger. Bingo! A Hooke's Joint. Make sure that the index fingers are more or less parallel and twist your left wrist. The die twists and pulls the right wrist round with it, even though the wrists are not perfectly aligned. Simple enough.
The Hooke's Joint is fine for small deviations from straight, as found on propeller shafts (the long shaft between the gearbox and the back wheels on a front-engined, rear-wheel drive car). The die is replaced by a cruciform shape formed by two intersecting cylinders, and your finger and thumb tips are replaced by needle bearings, but the principle is the same. Small deviations mean that the bearings don't move too much, so wear and efficiency are not a problem.
When the deviation gets larger, a different dynamic comes into play. The bearings move more and begin to wear, and the angles become so acute that the cruciform shape stops working altogether and begins to behave like a rigid joint. Still got your die? Get your fingers in position then move your right hand so that the forefinger is perpendicular to the forefinger of your left hand rather than being roughly parallel. Now rotate your left wrist. No more smooth movement: it tries to pull your right hand round in circles.
A secondary problem comes from the vibration caused by a Hooke's joint. Once again, this is not an issue when the deviation is small, but as it gets larger the output shaft begins to behave in a strange fashion: instead of rotating at a steady speed, its rotational speed goes up and down rhythmically. The speed variation is sinusoidal and the effect - if we used it to drive a wheel with any kind of turn on it - would be to make the car feel as though we were pushing the throttle up and down in rhythm.
This is hard to demonstrate with your die and fingers, but if you have a socket set with a universal joint in it you'll be able to see the problem quite easily.
The Two Problems...
So for us to be able to drive the front wheels of a car there are two problems to solve: the issue of sideways forces when the wheel is turned by an appreciable amount, and the issue of maintaining steady rotational speed.
Both are accomplished with the same brilliantly simple device: a constant velocity (CV) joint.
... And Their Solution
Picture, if you will, a tennis ball made of steel. Draw two dots on opposite extremes of the tennis ball (like the poles on a globe), drill through and weld a shaft in there so it projects from one end of the ball but not the other. Now join the dots with a series of six, evenly-spaced lines running over the surface from pole-to-pole. File away along these lines until you have six grooves big enough to rest your thumb in.
Now take a short hollow cylinder, also made of steel, into which the tennis ball will fit. Inside the cylinder, machine six grooves that match those in the tennis ball. Put the tennis ball inside.
Finally, take six ball-bearings just the right size to sit in the thumb-sized grooves. Drop them into the grooves and hold them in place with lots of really thick molybdenum grease. Put a ring over each open end of the outer cylinder so the ball-bearings can't fall out.
What you have is a CV joint. When you turn the shaft on the tennis ball, the cylinder turns, and it can be connected to a wheel. When you move the cylinder out of alignment with the shaft on the tennis ball, you can keep turning the tennis ball. We are cheating of course: the cylinder's angular speed is not actually constant, but the variation is much smaller and less noticeable.
Obviously those ball-bearings are going to take a hammering. Instead of rolling around a nice race as they were designed to, they are stuck between two grooves that, like a giant pair of scissors, are trying to cut the balls in half. That's what the grease is for. CV joint grease is very slippery stuff and, when it gets hot, it runs all over the place, so you have to enclose the whole thing in a rubber bellows to stop the grease running out. When your car has its MOT1 they will check that the CV joint boots are not split, because if they split the grease is a goner, the joint dries up and the bearings fail: bang! No drive.
So CV joints are not entirely trouble-free, although if the rubber boots stay in one piece they will usually last at least 100,000 miles.
So Why Do It Then?
This begs the question: why do it? Some car manufacturers spend fortunes trying to persuade you that rear-wheel drive is better and more balanced. Which it is, up to a point.
The problem with rear-wheel drive is that it's a bit like pushing a long pipe. If your pushing effort gets even slightly out of line with the pipe, the end you are pushing will swing out. It is a case of unstable equilibrium. While motoring journalists might love to drive cars sideways, very few drivers have the skill to do so safely (whatever they may think) and those who do would often prefer the back end to stay safely tucked in, thank-you very much.
Front-wheel drive is like pulling that pipe. Where you pull, the pipe will, sooner or later, follow. So front-wheel drive is inherently safer. It is also easier and cheaper to make front-wheel drive cars, as the whole engine, transmission and drive-train can be assembled in a single compact unit and plugged into the front of just about any body shape. There is no propeller shaft, so the floor can be flatter. The differential is in the engine bay, so the boot can be bigger. The ultimate in space-efficient motoring, the Mini, uses front-wheel drive for exactly this reason.