If the washer fills, but fails to agitate or spin, the likely cause is a failed motor coupling. There is usually a loud rattling noise associated with a broken coupler. This may be the noise you hear. NOTE: The washer will STILL drain if the motor coupling is bad. The following link explains how to replace one:
http://www.fixya.com/support/r385252-replacing_motor_coupling_whirlpool_top
If the washer fills, may or may not agitate, then stops right after filling, or just before the spin cycle*, you more than likely have a failed lid switch. NOTE: The washer will NOT drain with a defective lid switch. The following link explains how to replace a lid switch:
http://www.fixya.com/support/r385199-replacing_lid_switch_whirlpool_top
* These symptoms vary between models. The result is still the same, however, the washer generally stops at some point before the spin cycle and will not complete a wash load.
Read through both links and try to determine your symptoms. When it comes to lid switches, they sometimes come loose and only need to be retightened. Double check the mounting screws. In most cases, the clicking sound of the switch indicates the switch is good. However, I have found where the actual switch assembly was cracked or separated and made a similar sound, but the contacts were not engaging. Inspect the entire switch, if in doubt.
Motor Couplers allow for the Drive Motor to drive the transmission. This is the connecting link between the two. The coupler takes the punishment in order to protect the motor and transmission from damage. If you are in the habit of washing heavy loads (i.e., blankets, comforters, etc.) this can reduce the life of the coupler. A tell tale sign of a broken coupler is a pile of black filings under the washer. This is usually particles of the rubber bushing between the coupler halves. Another thing that happens is the center hole of the plastic coupler would round out and spin on the either motor or transmission shaft as the older couplers were made entirely of plastic. Replacement couplers (the part number I provided in the link) now have a steel grommet in the center of the plastic which prevents this from happening.
If you check both these possibilites and you still have problems, let me know. I'm trying to rule out the possibility of something more significant, like a transmission problem. Both of these parts are inexpensive (about $50 combined) and can be found at searspartsdirect.com. Just type in your model number in the search menu. The lid switch is located under the "Top and Cabinet" heading as item number 11 (part number 3949247). The Motor Coupling can be located under the "Brake/Clutch/Gearcase/Motor/Pump" heading as item number 13 (part number provided in the link). For comparative shopping, repairclinic.com also carries these parts, sometimes at a reduced price.
I hope this helps you. If you have questions, please let me know.