While there are several reasons brakes lock up, one is a dragging caliper piston. The friction this causes heats brake fluid and increases the pressure in the brake lines, locking a single wheel. Taking the car for a short drive and then checking the wheels for one that is warmer than the rest is a quick way to check for this problem.
On vehicles with anti-lock brakes, lockups are rare. However, bad pads, calipers or cylinders as well as the master cylinder all cause problems on occasion.
If all the brakes lock simultaneously, the master cylinder is likely the problem. This hydraulic cylinder converts the mechanical force of pushing the brake pedal into hydraulic pressure to move the pads against the rotors. Over time, seals in the master cylinder begin to break down, causing retention of pressure in brake lines. All the pads rub against the rotors and generate heat, increasing the pressure. In turn, the calipers force the pads against the rotors with more force, locking up the vehicle.
According to Popular Mechanics, repairing a master cylinder is the most expensive brake repair. The magazine encourages owners to pay a few dollars more to replace calipers and rotors, for the peace of mind that their brake problems are in the past for several years.