Unless you forget the Sunday joint in the oven, a burning smell from any electrical appliance is something you should take very seriously. It's generally a sign that the machine is about to break down, and it could well indicate that it's in a dangerous condition. If you smell burning in or around your washing machine you need to take immediate steps.
Where is the smell coming from?
If the smell is clearly coming from the washing machine itself, switch it off and unplug it immediately. If the smell appears to be coming from the plug, plug socket, or wire, switch off the power to the circuit and wait for everything to cool down before unplugging.
In either event don't use your machine until it's been assessed by a service engineer. A burning smell from this appliance is a sign that you need urgent washing machine repairs. There are a number of things your engineer will check.
The drive belt
A worn or damaged drive belt can slip, this causes friction which leads to the belt overheating, resulting in a very distinctive burning rubber smell, indicating that the worn belt needs to be replaced. While this task isn't especially complicated it's still best undertaken by a qualified repairman. Washing machine motors generate a lot of static and it's possible to get a very nasty shock from one even when the appliance is unplugged.
Drive motor pulleys
Pulleys can rust or degrade over time, and once this has happened they will generate friction when the machine is in operation. At worst a damaged pulley can seize up totally, which will put a strain on the drive belt and lead to overheating.
The drive motor
Like the pulleys and belts around it, the drive motor itself can overheat and cause a burning smell. Sometimes this is as a result of a primary fault in the motor, other times a fault in a belt or pulley can cause the motor to burn out. A competent engineer will generally check all of this, to determine the full extent of the work to be done before starting your washing machine repairs. Replacing one or two components is likely to be cost effective but if several parts are faulty it might be more cost-effective to replace the machine.
Electrical faults within the machine
Faults in the wiring or water coming into contact with the electrical components of your machine could result in an electrical burning smell from within the washing machine. Switch it off, isolate it from the power supply and call an engineer.
Reduce the risk of your washing machine developing faults.
Every home appliance has a usable lifespan and sooner or later faults will develop, but there are a few things you can do to maximise the chances of getting the longest possible use from your washing machine. Attending to faults as soon as you notice them will always keep your washing machine repair bills down in the long run. A single faulty component could can cause a cascade of other problems to develop, so delaying repairs may increase the work that needs to be done and the cost of doing it. Apart from this, the very best favour you can do your washer is to not overload it. Overloading puts excessive strain on the belt, the pulleys and the motor itself making their failure more likely.