Welding on cast iron is a bit different than welding on most other metals. Because of its chemical makeup, cast iron is very prone to cracking when heat is applied. Metals such as wrought iron or mild steel can simply be welded with minimal preparation. However, welding cast iron requires the material to already be hot before an arc is struck, and also requires a slower cool-down time. If done right, cast iron can be repaired very successfully.
Preheat the cast iron evenly with a torch. Because of its nature, cast iron will crack if it is welded while cold. It requires a preheat in order to avoid damaging the material. Apply heat using a torch to the entire surface of the cast iron, including the portion to be welded. By bringing the cast iron's temperature up slowly before welding on it, we can ensure that the heat caused from the arc does not damage the iron itself. If the cast iron object is really big, preheat as much of the area around the area to be welded as possible. If the piece is small, simply preheat the entire thing.
Weld the cast iron very slowly, stopping every 1 to 2 inches in order for the iron to cool a bit in between welds. If you attempt to weld the entire area in one shot, the iron will likely crack because of stress extreme heat produces. If you are using flux cored wire, use a wire brush and scrape the flux off of the weld each time you pause to ensure that the welder gets a good, clean arc when you resume welding.
Cool the cast iron down very slowly after welding. If the cast iron is allowed to cool too quickly, cracks are inevitable. If the item welded was rather small, you might consider wrapping it in a thermal blanket or even burying it in sand to prevent rapid cooling. If the item is big, hit it with the torch every thirty seconds or so for a short period of time, which will bring the temperature down gradually.