This is a basic question, but if a car's wheels are rotated by the drive shaft through the differential, which is a rigid piece of metal with gearing inside, how does the suspension system allow the wheel to move around so the suspension can dampening the shocks from the road?
So a couple of options:
rear axle mounted on cart springs or coil springs - high unstrung mass is a disadvantage, but classic and strong
the diff is fixed to the body / chassis and drive shafts to each wheel - most well known is the jag xjs rear as it was then borrowed by custom builders
completely independent rear with hydraulic motors at each corner - used in special applications
There are other variants, like Alfa split engine and gearbox to put gearbox at rear to get 50/50 mass distribution.
The main drive shaft from the engine to the (rigid) rear axle contains a swivel joint called a U-joint which allows the shaft to bend while still rotating and transmitting torque. This lets the rear axle rise and fall with bumps in the road without breaking the drive shaft.
Better handling can be had by bolting the center of the differential housing to the car body and putting a U-joint in each of the axle drive shafts so they can swing up and down independently of one another. This is called independent rear suspension.
There are universal joints that will let you transfer rotation along a new axis which is not quite inline with the input axis.
Using two of those on each half axle will let you absorb the movement of the wheels in cases where the diff is rigidly attached to the body.
Another option is to let the differential move about and use those universal joints on the central driveshaft. In this case each wheel isn't independently suspended but that is fine in many situations.