The cassette is the cluster of sprockets on the axle of the rear wheel. It is a set of sprockets and spacers with no moving parts as it slides on to a cassette body around the axle which contains the moving parts and is locked in place with a lock ring.
The number of sprockets determines how many gears you have and what ‘speed’ your gears are i.e. when you hear people say they have a 10 speed groupset they have 10 cogs at the back, 11 speed is 11 cogs etc. The number of teeth on the sprocket determines how easy or hard it is to pedal; the lower the number the more difficult to pedal whilst vice versa with the more teeth the easier it is. Sprockets cannot be mixed so you buy whatever ratio you need in a pre determined format, eg 12- 25, but there is a wide choice of ratios available and the cassette is easy to change with the correct tool.
There are two types of cassette body available; Shimano and Campagnolo who use different splines on the cassette body and are therefore incompatible with each other’s systems, although SRAM cassettes are compatible with Shimano. You must use a corresponding number of sprockets to your gear mechs, levers and chains, i.e. 10 speed with 10 speed and so on, for perfect shifting. Likewise if you upgrade to a higher number of sprockets on your cassette you must upgrade to the similar compatible number on your gear mechs, levers and chain.