Belay Devices are pieces of climbing equipment through which the rope is passed (that's connected to the climber that is leading). When, or if, the climber falls off the friction created by the device places the load onto the harness, and thus the person, holding the belay device (the belayer).
There are many different types and brands of belay devices on the market, these fall broadly into two different designs: Stitch-Plate style devices and Semi-Automatic Devices.
Stitch-Plate style devices work by the rope being fed in a loop through one of the slots and clipped into a carabiner. If the climber then falls or needs to be held, the s-kink in the rope, created by the device, creates resistance allowing the belayer to hold the weight of the climber. These have two slots and can be used to belay on either one or two ropes. There are many variations on this design.
Semi-Automatic units are slightly different in that they use varied mechanisms to achieve an extra level of locking safety – i.e. less actual force from the belayer is required to lock the device. These are generally for single rope use only, and especially popular for use at climbing walls or on bolted crags.