Open the microwave, remove the turntable and thoroughly clean the walls with a nylon scourer and soapy water. Pay particular attention to any food splashes or stains to reduce arcing and smoke. Wash the turntable --- both the glass plate and plastic support --- in a sink of hot, soapy water and dry them before placing both back in the microwave.
Do not microwave metal foils, plates with gold or reflective trim, cutlery or shiny ovenware. Arcing often occurs by mistake when a fork gets left in a meal or when a piece of foil clings to the edge of a plate. Carefully examine any plates for reflective trim that can cause arcing.
Remove the metal cooking rack if you own a combination microwave and convection oven. Leaving the metal cooking rack in place in microwave mode causes arcing. The rack is intended for use with convection, broil or toast modes only.
Immediately stop and unplug the microwave if you notice sparks anywhere apart from the cooking cavity. Sparks and smoke coming out of the vents are often the result of a serious electrical fault, and you should immediately stop using the appliance until it can be examined by a professional technician.