If the capacitor on your washing machine is broken, the machine won't work. It's likely you will hear an electrical hum, but that the drum won't rotate if the problem is electrical.
Capacitors start motors
Not all washing machines use capacitors. In those that do, the capacitor generally sits atop the motor. The capacitor stores an electrical charge to get the washer's motor going. When the capacitor isn't working, the motor will not be able to start or function.
Unplug the machine
If your machine is making a humming noise and seems to be getting power, but isn't working, unplug it. When electronic components are malfunctioning, they can catch fire. Before that happens, disconnect the power source to the machine.
Discharge the capacitor
The capacitor can still hold a charge, even when the machine isn't plugged in. Before touching anything inside the machine, make sure you discharge the capacitor. You can do this by touching the terminals with screwdrivers, but if you do, be mindful that your skin only comes into contact with the plastic handles of the tools, not the metal. If the idea of poking around sounds risky, it is. Read more about how to safely discharge a capacitor before attempting it if you aren't familiar with electrical work.
Remove the wires
After discharging the capacitor, remove the wires connected to it, making sure to note which colour wire attaches to which terminal.
Test the capacitor
You can test your capacitor with a multimeter. Once you've discharged the unit and disconnected the wires, touch the leads to the terminals. If the needle doesn't move, the capacitor will have to be replaced in order for the machine to work.