Rim brakes are the traditional brake design that rub on the rim to slow and stop the bike. These work great, usually weigh less than alternatives and are simple to service and repair.
Rim brakes have some weaknesses, however. Because they rub on the rims, they gradually wear the rims, which may damage them in time. Also, muddy and wet conditions rapidly wear rim-type brake pads and also reduce gripping power, sometimes significantly.
For these reasons, many off-road bikes today come with disc brakes, which grip a disc (also called a "rotor") attached to the center of the wheel and work similar to some car brakes. These are affected less by wet and muddy conditions (so you don't lose much braking power) and they don't wear the rims so your wheels will last longer. Some models utilize hydraulics for awesome modulation, stopping power and reliability.
Like the brake pads on rim brakes, disc-brakes have brake pads (sometimes called shoes), that wear, too, however, these tend to last longer and hold up far better in muddy and wet conditions so the pads don't need replacing as often. Plus, with hydraulic discs, there are no cables to worry about so with just a little simple maintenance you have amazing brakes always at the ready.