Even to novice bicycle buyers, one of the most obvious features that distinguishes one bike from another is the number of gears it has in the front area where the pedals are. These gears are referred to as chainrings, and the chainrings are a part of the whole assembly known as the crankset.
A crank set consists of two crank arms and one or more chainrings. The crank arms are the levers on the right and left that connect the pedals to the bottom bracket. Sometimes the bottom bracket itself is also included when you purchase a crankset assembly.
Except for singlespeed bikes and fixed-gear/track bikes, most bicycles have either a double crankset (with two chainrings) or a triple crankset (with three chainrings). In either case, cranksets come equipped with different-sized chainrings based on the gear ranges needed for the intended use of the bicycle. Chainrings are measured by the number of teeth they have; the more teeth, the large the chainring is, resulting in higher gears (harder to pedal). The less teeth the chainring has, the smaller it is, and the easier it is to pedal using that particular gear.
Most casual bicyclists prefer a triple crankset, because it provides the widest range of gearing, especially on the low-gear end, for the easiest-possible pedaling up steep hills. Regardless of the size, the smallest chainring on a triple crankset is often called the "granny gear."
Triple chainrings can come in many different configurations. On road bicycles, a typical setup is a 52-tooth large (outer) chainring, a 42-tooth middle chainring, and a 30-tooth small (inner) chainring. This gives a good high gear for really accelerating on flats and descents, and a good low gear for spinning up all but the most brutally steep of climbs on paved roads.
In the early days of mountain biking, bike builders realized that riders would need much lower gearing for steep off-road climbs, and so typically used a 48- or 46-tooth big ring, a 38- or 36-tooth middle ring, and a 28- or 26-tooth small ring. Around the early 1990's, mountain cranksets were redesigned to accomodate even smaller chainrings, and a new "compact" mountain crankset became popular, with 44-32-22 chainrings. This became the de facto standard for mountain bikes within a couple of years and continues through today, and so the term "compact" is rarely, if ever, used any more to refer to this setup.
Meanwhile, people riding fully-loaded touring bikes wanted something that was a happy medium between a road bike triple and a mountain bike triple, and so the 48-38-28 or 46-36-26 setup became popular on those bikes, providing a relatively high gear for cruising on flat roads, but still a pretty low gear for pulling the weight of their tents, sleeping bags, cooking gear, etc. up hills. This setup has now become commonly known as a "touring" crankset, and it's also found on many hybrid bikes.
In the racing world, a double crankset is the standard. The two chainrings provide a much simpler and more reliably-operating system compared to a triple, plus the overall weight is slightly reduced. Even on steep climbs, a small granny-gear is not needed by racers with super-strong legs and super-lightweight bikes. A bicycle designed for road racing usually has a 53-tooth large chainring and a 39-tooth small chainring.
Over the past 5 or 6 years, the "compact double" crankset has become popular with cyclists looking for the weight and efficiency advantages of a double chainring, combined with the low-geared hill-climbing ability of a triple chainring. The compact double usually has a 50-tooth large chainring and a 34-tooth small chainring, and depending on the size of the cassette used on the rear wheel, provides a lowest gear combination that is almost as easy as what you find on a triple setup, thus giving you the "best of both worlds."
What would prevent you from using a double crankset with a very large chainring combined with a very small chainring, giving you even better of the "best of both worlds?" The limiting factor is that you can't have too much of a difference between your smallest and largest chainring, because it would be impossible to position the front derailleur without having the chain always rubbing it while in one chainring or the other. Another design consideration is the rear derailleur must have enough chain wrap capacity to take up the slack required when switching from the large to the small chainring (a topic for a future TechTalk...).
Many cyclocross racing bikes use another version of a double crankset, with a 46-tooth large chainring and a 38-tooth small chainring. Since cyclocross race courses typically don't have long, flat sections, and the racers dismount and run up the short, steep hills, they choose to sacrifice both the very high and very low gear ranges in order to have a smaller tooth difference between their chainrings, thus providing smoother and quicker shifting.
In addition to the number of teeth, chainrings and crank arms have an important measurement called the BCD, for bolt circle diameter. Chainrings are held in place on the right crank arm by a set of four or five bolts. The BCD is the diameter, in millimeters, of the circle formed by these 4 or 5 bolts. On a 4-bolt system, you can just measure the distance between two opposite bolts to get the BCD, but on a 5-bolt system, a special tool is used to measure the diameter of the virtual circle formed by the bolts.
Typical road cranksets have a 130mm BCD, with an additional set of bolts with a 74mm BCD for the granny gear if it's a triple. Most mountain cranksets use a 4-bolt 104mm BCD for the outer and middle chainrings, and a 64m BCD for the granny gear. Compact double cranksets usually have a 110mm BCD. 130mm is the de facto standard BCD for track cranksets. As always, there are exceptions! For example, most road cranksets from Campagnolo use a 135mm BCD.
The chainrings on most modern multi-gear drive trains have specially-designed features that aid in shifting from one chainring to another. Some teeth have special shapes on just a few teeth per chainring. Some chainrings have extra plates, called ramps, attached below the teeth, plus pins on the sides in strategic locations, both of which help move the chain along as you shift.
Finally, you do have some choices for the length of your crank arms. They are measured in millimeters, and the measurement is taken from the center of the bottom bracket spindle to the center of the pedal mounting hole. Most road, mountain, and hybrid bikes come with 170mm or 175mm crank arms, which the majority of riders find acceptable. Riders of much shorter or much taller stature can sometimes opt for 165mm or 180mm cranksets. If you're really particular, some models are available in 172.5mm. Not all manufacturers make all of their crankset models in all sizes, though. Many track bike riders use the shorter 165mm crank arms in order to help avoid striking their pedals on the pavement while going around sharp corners, and so most track-specific cranksets come in this length.