I would say you either have an extremely worn out cassette and chain, or lack of tension in the rear derailleur. Possibly exacerbated by the gear indexing being out of adjustment.
You can inspect the cassette sprockets for wear. Very worn teeth will be asymmetrical and look like a shark fin. A Google search will yield images of worn sprockets. Check the front chainrings at the same time.
If the cassette, chain and chainrings are worn they simply have to be replaced.
There are two tensioning springs in a rear derailleur known as the A and B springs. The A spring rotates the cage, the B spring tensions rotates the whole derailleur relative to the bike frame. Either could be broken. The B spring is adjusted by the 'B screw', this might be slackened off far too much.
Change gears onto the smallest sprocket and chainring, then check to see if the derailleur and cage have any spring tension. You can Google for how to adjust the B screw. If either spring is broken you will probably need to replace the derailleur.