Most current washers have some sort of error/fault indicator to identify the probable defect why it will not function. This could either be a blinking light or codes (letters & numbers) in a display panel and would be applicable only to certain models/versions/brands of the washer. Pls post back make and model as well as any error/fault code indicated.
On other simpler models, this could either be a belt, motor or controller problem. In some instances, it could be the starting capacitor while in others, it could simply be, no water, door not closed or laundry (load) too heavy.
Hope this be of initial help/idea. Pls post back how things turned up or should you need additional information.