A cassette is a cluster of steel sprockets ranging in size that provides the bicycle drive train with a variable range of gear ratios. It transfers power received from the chain to the freewheel or the hub. A larger cog will engage more links of the chain, allowing for more torque climbing up hills or accelerating, but it will have a lower top speed due to the distance the chain has to travel for one rotation. On the other hand, small sprockets will turn more rotations for every cycle of the chain, meaning a higher top speed but less power for acceleration. Cassettes vary widely in the number of sprockets, sprocket sizes (gear range), sprocket spacing, and hub and freewheel compatiblities. This diversity comes from the many different styles and functions of all bikes.
For instance, BMX bikes don't change speed (and therefore gears) very often, so only 1-3 sprockets are usually enough to cover the effective range needed to comfortably accelerate. However, road cycling and mountain biking require the drive train to stay in a usable power band for the rider at all times, whether climbing steep hills or zooming through straightaways. This means many sprockets, large to small, usually anywhere from 7-11 speeds.
The Compatibility Factor: The form in which the cassette works with the hub/freewheel is a melting pot of mechanical designs.
Once upon a time all bikes used standard hubs with standard threads for standard freewheels fit for standard cogs. If different gear ratios were desired, or new cogs were needed, all parts could be interchanged without question. And then the late 1980's happened.
Shimano designed a brilliant new component called the Freehub, which was just a combination of the freewheel and the hub. It saves on weight, simplifies replacing cogs, and completely eliminates removing the ratcheting mechanism.
Some time later, Shimano designed the "hyperlink", which allows for the chain to be engaged with 2 sprockets simultaneously while shifting. It requires special cogs with ramps to be aligned together, but the result was smoother, quieter shifting than ever before.
One problem with these developments is that some companies hold on to their patents like children with candy. With their parts now obsolete and incompatible, other companies such as Campagnolo were left to make their own similar designs. These, along with similar instances with other components (see BB30) resulted in divergence among bike component companies.
"But BikeTube, surely there isn't a problem with having different systems of cassettes and hubs, as long as it works right?"
Not unless you want to customize, or need to replace some cogs. The big takeaway is that you need to be careful of compatibility when choosing new cassette components. And don't call me Shirley.
Maintenance difficulty (5/10): There will be wear and tear on the cogs throughout the life of the bicycle. Keeping the cassette clean and the chain properly lubed will ensure better shifting and longevity, but the teeth will wear down. Removal of the cassette is different with many systems, and will require a freewheel/lock ring removal tool, and a chain whip.