When a car turns a corner, one wheel is on the “inside” of a turning arc, and the other wheel is on the “outside.” Consequently, the outside wheel has to turn faster than the inside one in order to cover the greater distance in the same amount of time. Thus, because the two wheels are not driven with the same speed, a differential is necessary. A car differential is placed halfway between the driving wheels, on either the front, rear, or both axes (depending on whether it’s a front-, rear-, or 4-wheel-drive car). In rear-wheel drive cars, the differential converts rotational motion of the transmission shaft which lies parallel to the car’s motion to rotational motion of the half-shafts (on the ends of which are the wheels), which lie perpendicular to the car’s motion.
The differential is the thing that works both drive axles at the same time, but lets them rotate at different speeds so that the car can make turns. When a car makes a turn, the outer wheel has to turn faster than the inner wheel, due to the difference in the length of the paths they take. The differential is located between the two wheels, and is attached to each wheel by a half-shaft rotated through a bevel gear. Four-wheel drive cars have a separate differential for each pair of wheels. A grooved, or splined, axle side gear is positioned on the splined end of each axle. The side gears are driven by “spider” gears, which are little gears mounted on a shaft attached to the differential case. As it is supported by the differential case, the side gear can turn inside the case. The differential case can be turned, revolving around the axle gears. The differential pinion (a pinion is a small gear that either drives a larger gear or is driven by one) shaft turns the ring gear, which is fastened to the differential case. The propeller shaft (drive shaft) connects the transmission output shaft to the differential pinion shaft. The turning differential case is mounted on two large bearing holders. These bearings are called carrier bearings. The propeller shaft rotates the ring gear pinion, and the pinion turns the ring gear. The ring gear then turns the differential case and pinion shaft, but the axle side gears will not turn. By passing the differential pinion shaft through two differential pinion gears that mesh with the side gears, the case will turn and the axle side gears will turn with it. During turns, the side gears turn at rates dictated by the radius of the turns, and the spider gears then turn to allow the outer wheel to turn faster than the inner one.
See How differentials work