Chain skipping on MTB
When your chain "stretches" beyond a certain point, typically .75mm per 4 inches links, it will begin to reshape the teeth on your cassette and chain rings. 

At that point, replacing your chain will not help unless you also replace your cassette, and possibly your chain rings.

Check the answers on this question to see how to know when your chain is worn.

If your chain measures beyond 1.0mm per 4 inches, then you must replace chain, cassette and chain rings, or it will skip as you are describing.