If the chain is worn out replace it.
Mountain bike rear sprocket slipping.
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.
The freewheel mechanism is contained inside the splined housing.
The best is to bring the bike to shop to repair it.
Skipping can also be cause by a worn chain worn chainrings and worn sprockets step 2 remove the rear wheel.
If they aren t you should replace it.
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.
Look over the chain for excess wear or bent links.
If a link is bent either replace the link or the entire chain.
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.
To fix a skip in the rear derailleur shift your chain into the smallest ring on your rear cassette the hardest gear and the middle or larger ring on your front derailleur.