Unplug the vacuum cleaner from the electrical outlet. Never work on a vacuum still attached to a power source.
Locate the on-and-off switch. Examine the housing that keeps the switch in place. Search for the screws that connect the housing to the vacuum cleaner. Unscrew the housing screws, then remove the housing.
Unscrew the switch from the machine. Replace it with a new switch. Screw the new switch into place.
Replace the housing and screw it back into place. Plug the vacuum cleaner's electrical cord back into the wall outlet, then test the new switch to ensure it works.