The most common problem I have seen on vacuum cleaners is a damaged cable - most often a wire pulled out of a terminal inside the plug - persistant and over enthusiastic tugging is the cause.
It may be any of these...
Bad wall socket
Bad Plug connection
Damaged cable
Defective on/off switch
Defective overheat cutout
Motor or motor brushes (usually preceded by sparks, noise & smell)
Good luck...
Peccavi
January 2010