How to chose a new cassette:
- the make of the drive-train, which you may find on the body of the rear derailleur. (let's assume Shimano)
- the number of cogs on the cassette (let's assume 10)
- the number of teeth on both the largest and the smallest cogs on the cassette (let's assume 42 and 11)
The number of cogs determines the type of chain (10 cogs = 10-speed chain) and of course the type of cassette you'll want to order. (in our case a ten-speed)
The two teeth counts tell you which cassette you'll need. In our case it would be an 11-42 cassette.
Don't forget to check the front chainrings for wear. Excessive wear makes them look like shark-teeth.
Also you'll need tools to remove the cassette, a chain-whip and a brand specific lockring tool, as well as a chaintool.
Don't throw away the worn chain too quickly, you'll need it to determine the number of links on your new chain since chains sold longer than required and have to be shortened to the correct number of links.
On YouTube you'll find a number of videos explaining the procedure.