To replace the magnetron coil on a microwave, discharge the capacitor, dissemble the microwave, remove and replace the coil, and reassemble the microwave. While some specifications might vary by brand, the instructions for the GE microwave are a useful guideline for replacing the magnetron coil.
Before starting any repairs, unplug the microwave and discharge the capacitor. Locate the capacitor in the back, and place a screwdriver with an insulated handle between the diode connection and the ground. This discharges the capacitor.
Open up the interior of the microwave by removing the front grill and the control panel. Unscrew all the perimeter screws, and remove the microwave casing. Unplug the cord from inside, then unscrew and remove the side panels. Locate the magnetron, and unplug it from its coupling. Remove the thermostat on the side of the magnetron. Unscrew the nuts on top of the magnetron, and pull it out of the microwave cavity.
With the wire terminals facing up, place the new magnetron tube inside the microwave cavity. Replace the nuts to secure the new magnetron tube. Reinstall the thermostat to the side of the magnetron tube. Re-assemble the microwave by reversing the disassembly order: screw the side panels back into place, plug in the cord, replace the microwave casing, re-attach the casing, and secure both the control panel and the grill in place.