At its most basic level, AWD is intended to maximise grip by transferring torque from a spinning tyre to the tyre with grip.
Depending on the car, the system can be permanently on or it kicks-in "on demand" as the sensors detect wheelspin. The on-demand systems use less fuel because they are usually only driving one axle, but generally aren't as effective as permanent AWD systems.
Neither system can or was designed to match conventional four-wheel drive systems off-road. 4WDs usually have a high and low range transfer case and the differentials can be manually locked for extreme off-roading. AWD was intended to optimise traction in regular low-grip driving situations such as snowy or icy roads.
AWD systems use a centre differential to divide torque between the front and rear drive shafts. Common types of centre diffs include multi-plate hydraulic clutch, viscous coupling and Torsen units.
The viscous coupling operates using a fluid housed inside a series of clutch plates that are attached to alternate drive shafts. The liquid (usually silicone-based) changes properties into a near-solid when subjected to shear stress that occurs when the rotational speed of the two shafts changes, effectively locking the diff.
A multi-plate clutch is computer controlled and locks when sensors detect slippage between the drive shafts. The Haldex unit is a version of this and uses a hydraulic pump to depress a piston and lock the clutch when it detects slippage. Units such as the Torsen diff achieve the same effect using mechanical gearing.