Washer

My top load washer would not spin normally. I could hear a grinding sound and I need to turn it off and on or shake the machine or open and close the lid before it starts spinning normally. what could be wrong with it and what can I do about it? Thanks.