washer doesn't spin or agitate

Older stackable washer dryer. Washer fills and drains but will not spin or wash, just a humming noise then it clicks and shuts off. I hate the laundry mat- is there a cure?