May washing machine wills with water and then stops. What are likely causes?

Update: kristenh: The washer fills completely. When I pull the drain hose and run it across the floor to the drain it empties. It doesn't do anything else.
Update 2: The lid switch can't be the problem, because if I open the lid while it is filling, it stops filling until I close the lid.
13 answers 13