If this is a Whirlpool manufactured top loader (such as Kenmore), the most common cause of the problem you are experiencing is a lid switch malfunction. Symptoms may include, filling and stopping on the intial fill cycle, a wash tub that will not drain, and stopping right after the wash cycle and not advancing to rinse or spin cycles.
The lid switch is usually mounted under the washer top casing, on the right hand side on most top load models. It is activated by a plastic piece on the lid (called a "Lid Strike") through a small hole on the rim of the wash tub opening. In many cases the lid strike breaks off the lid, or the lid switch becomes loose and no longer makes contact. Inspect the lid to make sure the lid strike is still intact, and then inspect the mounting screws (adjacent to the small opening on the wash tub rim) and make sure they are snug. If you determine the switch to be defective, the following link explains how to replace one:http://www.fixya.com/support/r3557193-replacing_a_lid_switch
On some models, the lid switch is located under the top casing by one of the lid hinges. You will know if you if you have this type of switch, because It does not have a lid strike and the small hole on the right hand side of the wash tub will not be present. This switch is actuated (toggled) by a rod on the lid hinge. With this type of switch, if you locate it and it can be toggled by hand, you may only need to adjust the actuator by bending it slightly.
NOTE: You do not have to drain or bail the water from the washer tub to perform this repair. Once a defective lid switch is replaced, the washer should drain normally.
A replacement lid switch (if required) can be purchased at any of the following web sites:
The average price is about $20 - $30 if you perform the repair yourself. Prices differ between sites so shop and compare.
If you have questions, or need additional assistance, please post back with your MODEL NUMBER and let me know. The lid switch is a very simple repair that you can easily perform without the assistance of a repairman. I hope this information is helpful.