There were a couple of real web divers answering your question, Alix.
A rebreather is an apparatus that allows gas (not air!) to be rebreathed.
Rather than inhaling has from a second stage, and exhaling it into the water, the gas is in a loop in which it circulates. When the diver breathes from the rebreather, he becomes part of that loop. The loop consists of DSV (Dive/Surface Valve = mouth piece), at least one counterlung (flexible space to breath to and from), a scrubber canister, gas supply and hoses to connect it all. Those are common on all rebreathers.
When you inhale from the loop and exhale into it all gas stays inside. Your body metabilizes oxygen, and generates carbon dioxide. The O2 needs to be replenished and the CO2 needs to be removed from the loop. The latter happens in the before mentioned scrubber canister, where tha CO2 is chemically removed by the absorbant, generating heat and water in the process. Therefor the gas in a rebreather is warm and moist. This process, too, is common to all rebreathers.
The main difference is the gas addition, and the gas or gases that are being added.
Gas addition can be manually through a valve by pressing a button as needed (manual gas addition), constantly through a valve or orifice (constant mass flow), an automatic demand valve valve, mechanically per breath (RMV keyed) or by a battery powered valve (solenoid).
The simplest rebreathers are O2 rebreathers. They usually have a single breathing bag, one or two hoses with a DSV to breathe from, the scrubber cannister and a single, small (1.5 to 2 liter) oxygen tank and push button valve. They are used mostly by combat swimmers to move stealthy below the water surface.
In other units a single premixed gas is added, which is the case with semiclosed circuit units. Either more gas is added (cmf) than needed, with the difference being dumped into the water after exhalation, or a measured amount is dumped in the water after breathing it and then mechanichally replaced (RMV keyed). These units have no electronics at all. Either nitrox or He mix are supplied depending on depth, limits and deco are the same as on OC, but with the gas supply extended between 4 and 10 times.
Closed circuit rebreathers replace only the metabolized oxygen during a level dive, either manually (cmf + manual addition) or electronically (solenoid). A second gas is used to dilute the pure O2 to make it safe for depth greater than 6msw/20 fsw and to compensate loop volume for ambient pressure (like adding gas to your BC when descending - ergo, on ascent all rebreather need to dump gas and hence expell bubbles). This diluent is either compressed air or a He mix, again depending on depth. These units contain O2 sensors and a display to monitor that the correct amount of O2 is in the loop, to little will incur oxygen starvation, too much will become poisenous. As the diver metabolizes as much O2 at depth as he does at the surface, gas savings are enormous. If you metabolize one liter of O2 at 1 ata, you'll matabolize 1 liter at 10 or 20 ata, not 10 or 20 liters. In addition, the mixture in the loop changes to provide a constant pO2 rather than the constant fO2 that open circuit has. Mixed gas closed circuit rebreathers are basically nitrox (or trimix/heliox) mixing machines on your back. That extends the NDL and optimizes deco times, especially on multilevel dives.
While rebreathers share many basic components, their operation differs quite a bit from model to model and hence a type rating is needed. Rebreather raining is provided by most agencies.
Levels are the same as for OC, ranging from recreational limits to no limit exploration.
Requirements for training are being legally an adult with 50 to 60 dives and either nitrox or advanced nitrox certification. Requirements to pass the class are a bit steeper.

Additional skills before, during and after the dive are required. Pre- and post dive preparations are more elaborate, and more important as on OC.
The added components add complexity, and they can fail. While there are more failure points than OC, there are also more options and generally more time in emergencies.
The main risks come from the fact that you can breath off the loop even if the gas you're breathing will not support life. Too much or too little oxygen, or carbon dioxide not being removed making the loop toxic. The absorbant, especially the dust from it, becomes caustic when mixed with water.
Prices for new semi-closed units range from $1,600 to around $10,000, for closed circuit mixed gas units from $4,000 to about $17,000. Training ranges from around $350 to $1500, depending on unit and instructor.