my bike pedals but the back tire will not move
One possibility is that the hub's freewheel mechanism has broken. Maybe it's fixable with some spare parts or you may need a new freewheel hub body or a new hub altogether. Your LBS will be able to assess the situation.

It looks like this: https://www.google.gr/search?q=mtb+freewheel+hub+body&amp;tbm=isch