There are several welding processes that produce heat through different means. I think TIG welding is conceptually easier to understand than stick or MIG welding. The explanation will help understand other welding processes so I will start explaining TIG welding.
In TIG welding, (gas tungsten arc welding or GTAW), a welding power supply is connected to a hand torch with a tungsten tip. The negative electrode is connected to the torch. The positive electrode is connected to the work piece to be welded.
An arc is created by a circuit in the power supply called an arc starter which produces a high voltage, high frequency pulse between the tungsten tip and the work piece. The arc has enough energy to strip electrons from the shielding gas and create a path of ions that conduct electricity from the tungsten tip to the work piece. For tig welding, argon gas is typically used since its cheap, ionizes easily, and is heavier than air so it keeps oxygen out.
When the ion path is complete, the power supply senses the voltage drop between the electrodes. When there is no ionized path between the electrode and work piece, there may be 50V or more difference between the tungsten and work electrodes. After the arc is initiated, the voltage between the electrodes will drop to around 10V depending on the gap size. At this point, the power supply turns on the welding current. Tig welding is done with constant current power supply.
The arc is maintained by resistive heating of the shielding gas. The ionized gas acts a resistor where the heat is a function of the voltage across the gap and the current through it. The high current through the ionized gas dissipates so much heat that the gas stays hot enough to remain a plasma and continues to conduct.
The heat is not evenly distributed across the arc however. In this configuration that I've just described, the electrons are actually firing out of the tungsten tip and hitting the work piece. This causes the heat to focused on the work piece. If I reversed the polarity of the electrodes and connected the negative to the work piece and the positive to the torch, I would have the opposite effect. I would still get an arc and plenty of heat, but the heat would be focused on the tip not the piece I was trying to weld. This would result would be the tip melting into a ball and falling off. Tungsten is used for the tip since it has the highest melting point of any metal. In tig welding, you do not want the electrode melting and becoming part of the weld but in other types of welding you do.
In MIG welding(gas metal arc welding or GMAW), this is what you want. In MIG welding, the electrode is a conductive wire that is fed from a spool of wire at high speed. The wire melts and becomes part of the weld. The polarity is reversed so that the wire is positive and the work piece is negative. You don't need a arc starter with MIG.
When you squeeze of the trigger of the mig torch, the wire feeder starts pushing out wire. When the wire makes contact with the work, the wire acts as a resistor and heats up. The longer the stickout of the wire, the more resistance it will have and it will produce a different volt drop across it.
Due to the high current through the wire, the wire will melt and burn back. This produces a small gap between the work and wire where there is sufficent voltage to ionize. This creates an arc. Without getting into the specifics of different MIG processes(short circuit, drip, and spray transfer) this process essentially repeats. The wire makes contact. Heats up and melts back. Strikes an arc, then makes contact again. Etc.