Important first steps:
Check your vacuum cleaner and plug for any signs of smoke or heat. These appliances may get warm, but should never be hot to the touch. If you see any smoke, take the vacuum cleaner outside straight away as a precaution.
Check the filters and bag:
Blocked filters and a full bag can put extra pressure on the motor, causing it to overheat. Empty the bag and clean the filters, ensuring the intake vents are not blocked.
If the plug is hot:
Check the wiring of the plug, making sure everything is well connected.
Drive belt and brush:
On upright vacuums, ensure the drive belt hasn't slipped out of position or isn't jammed by something. It should be able to turn easily. The jam could also be at the brush end; check to make sure nothing is tangled around the brush that could stop it turning.
If the cleaner is still producing a burning smell or smoke after trying these tips, stop using it straight away and contact an electrician or qualified repair centre.