This article is a step-by-step procedure on replacing a mountain bike cassette & chain.
Featured parts used here are:
SRAM 8spd (11-32) cassette
SRAM 8spd Powerlink chain (top chain is old, bottom chain is new & longer)
Cassette lockring tool (SRAM cassettes are compatible with Shimano lockring tools)
Adjustible Wrench (for use with Park Cassette lockring tool)
Torque Wrench (ft-lb/Newton Meters)
First, either place the bike on a stand, or upside-down. Shift the rear derailleur to the highest gear (smallest cog). Remove the rear wheel from the bike. Remove the old chain utilizing a chain tool. After removing the old chain, use it to make sure the new chain has the correct number of links. If not, remove the extra links from the new chain.
Now use the chain-whip tool to keep the cassette from spinning as the lockring is being loosened.
Once the lockring is removed, the first two cogs will come off separately. The cassette should then slide smoothly off the hub. If it doesnt, apply some quality degreaser into the spline area between the cassette & hub. Let it set for a while, and then try again. If it still refuses to come off; flip the wheel over and using a small hammer and 6″ wooden dowel, tap the cassette off the hub body.
Be sure to take this opportunity to clean the hub body. Apply a quality anti-seize compound to the hub splines.
Locate the indexing spline on the hub body, and then match it to the index slot on the new cassette. Usually this index spline is smaller/narrower than the others. Line up the splines and slide the new cassette onto the hub. Make sure the cassette is seated fully onto the hub body.
Then, place the two small cogs onto the hub, making sure they are seated properly against the new cassette. Finally, install the new cassette lockring, but do not tighten yet.
Take note of the torque markings on the lockring! Then use a torque wrench to tighten the lockring onto the cassette.
Spin the cassette by hand to ensure that it moves freely and does not wobble. Fit the new chain around the derailleur guide pullys and the smallest front chainring. Again using the chain tool, fasten the chain back together (if using a standard chain, SRAM Powerlink chains do not need a chain tool).
Reinstall the rear wheel back onto the bike, and the job is done!