If you tilt your head down and look at the side or back of your microwave oven, you will see what looks like a small plate that screws or snaps into an opening called the waveguide. This plate is called a waveguide cover and its job is to keep moisture and bits of food from ending up in the working parts of your microwave.
The first thing to do is to remove the waveguide cover and check for food particles on the cover itself, or on the wall of the microwave around the cover. Small bits of food stuck to the waveguide cover, or around the edge, will spark and create that unnerving light show. You can use warm soapy water to clean both the cover and the wall of your microwave. Do not use abrasives or sharp objects to clean your microwave's waveguide cover as this could damage it.
If the sparking has caused a hole to be melted in the waveguide cover you will need to order a replacement at one of the many online appliance repair parts warehouses. The first thing to do is to find your microwave model number. The location of this model number varies widely, but can usually be found on the back or on a label inside the door of your microwave. Using this model number, visit a few of the websites that sell appliance parts and enter your model number in their parts search tool. Be sure to make a note of the part number that you find. This part number can be used to easily find the part on other sites and comparison shop since you are sure to find quite a variety of prices for this small microwave part.
While you are waiting for your new waveguide cover to arrive, it might be tempting to try and cover the hole with a piece of tape and keep on cooking, but that would not be a good idea. Chances are anything you try and cover the hole with will either melt or cause sparking itself. You could try using your microwave oven without the waveguide cover, but you run the risk of ruining your microwave oven if food or moisture contacts any of the internal electrical parts. Your best bet is to try and spend a few days without the microwave oven, if you can. It may feel like a return to the distant past when food was warmed on a stovetop or in the tradition gas/electric oven, but imagine the joy you will have when your new waveguide cover arrives and you can again enjoy the modern convenience of your microwave oven.