Cruiser bike weird pedaling problems, feels like back tire moving
There is something seriously wrong with your rear hub. From your description I think the bearings have collapsed, and the freewheel mechanism is failing also. This is possibly safety issue - and obviously the bike is not working right, so you need to have it seen to immediately and don't ride the bike until it is fixed.

You will either need a hub rebuild, or a completely new hub. Having one built into the wheel is expensive (it's labor intensive to build a wheel), so it's often easier and cheaper to buy a whole wheel.

It's absolutely impossible to tell you how much this will cost, as we don't know what make/model of bike you have. Do some research, find a reputable bike repair store and they will not rip you off.