When microwaves hit aluminum foil, they cause currents of electricity to flow through the metal. These currents can be strong enough to cause sparks if they flow around a corner, especially when the foil has been folded. The foil should never be placed near the edges of a combustible dish, as this could cause it to catch fire. You should also not cover entire food items with aluminum foil.