Driveshafts connect the transmission with the differential between the driven wheels. The driveshaft is most visible in engines with engines located in the front and rear-wheel drive. It's a thick rod or pipe running along the bottom of the vehicle. It turns when the vehicle moves. It has a number of different parts and tasks and must perform flawlessly or the car can stop moving.
The driveshaft works with two U-joints at either end connected to the transmission or the differential. U-joints are made of two "U" shaped pieces of metal held together with another piece that looks like a plus sign. They handle the different angles that the driveshaft makes when the wheels bounce along the road. The differential divides power between the wheels on either side. Since the driveshaft itself is a simple long bar or tube, problems occur most often within the U-joints and are first noticed because of an usual noise or vibration.
Things Wear Out
If the vehicle shudders when accelerating, makes a loud clunk when shifting gears or the bottom of the vehicle vibrates at any speed, the U-joints are worn and will probably need to be replaced.
Things Come Loose or Need Tightening
If there's a squeaking noise from the bottom of the car or a chattering noise while turning, the U-joints have lost their lubrication or the clamps that are holding the U-joint in place need tightening. Any knocking or clicking noise means the driveshaft is hitting the tunnel that it occupies in the vehicle's frame.
It's Not Always the Driveshaft
Not all noises or vibrations inside or under the car centre on the driveshaft. Any noise which is constant whether the vehicle is moving or stationary will be caused by the engine or transmission. If the noise changes when the road surface changes it is most likely due to a problem with the tires. If noise comes from the wheels while driving but changes when the car is driven through turns, then it probably comes from the differential. A chattering vibration which changes in a turn is probably the clutch or the differential.