If the chain is worn out replace it.
Mountain bike rear sprocket slipping.
The best is to bring the bike to shop to repair it.
If a link is bent either replace the link or the entire chain.
Skipping can also be cause by a worn chain worn chainrings and worn sprockets step 2 remove the rear wheel.
But if you want to repair it all alone first get your rear wheel off get the sprocket off and check the 3 teeth inside the sprocket they have to be perfect half circles.
If they aren t you should replace it.
Stop those bike gears slipping simple tightening of the gear cable with an anti clockwise turn of the barrel adjuster usually resolves most gear changing problems.
If not check cable housings chain and cogs for wear and see if the rear derailleur arm is bent.
I guess that the spring isn t hold the sprocket well.
The freewheel mechanism is contained inside the splined housing.
Disconnect the rear brake and undo the axle nuts step 3 remove the cassette.
Step 1 make sure that the problem is caused by the freewheel.