The brake caliper fits over the rotor like a clamp. Inside each caliper is a pair of metal plates bonded to friction material -- these are called brake pads. The outboard brake pads are on the outside of the rotors and the inboard brake pads on the inside. When you squeeze the brake lever, the pads squeeze against the rotor, creating friction. The brake pads have high-friction surfaces and serve to slow the rotor down or even bring it to a complete halt. When the rotor slows or stops, so does the wheel, because they're attached to one another.
A little credit where credit is due. This article is edited for bicycles, but I got most of the text from the 'how stuff works' website.
A traditional bicycle brake also uses a caliper attached to the bicycle to clamp a rotor and apply friction just like the bicycle 'disc' brakes. It just uses the actual rim as the 'rotor'. The principal is exactly the same, just less parts involved.