When an electric current passes through the wire, a series of high-frequency electrical discharges, known as sparks, occur between the wire and the workpiece. These sparks generate intense heat, melting and vaporizing the material in their path. As the wire advances through the workpiece, the molten material is flushed away by a dielectric fluid, usually deionized water, which cools the wire and helps maintain the gap.