Flash and butt welding both use the work piece as the electrode. They both use a clamp to hold the parts and apply force. The entire cross section of the work piece is welded. It is in the timing and application of force and current that they differ.
In butt welding the parts are clamped brought together under force and then current is applied. The parts heat due to Joules Law H=I2 rt heating. The joint gets hot upsets and after cooling the force is removed. The result is a strong butt joint.
Flash welding uses similar clamps but the parts are place close to each other before force is applied. Current initiates with the intent of creating an arc which generates large amounts of heat and metal flash. This flashing action both cleans and heats the mating faces of the parts. Then force is applied as the arc current is terminated. The hot parts are upset and joined together. The part cools and force is removed. This flash weld joint is also very strong.
You can see in the diagram that the arcing can create large amount of heat at relatively low current flow. However that arcing is a safety hazard and covers everything nearby. Butt welding has little flash but takes more current to generate heat on similar product. Both processes produce great joints.
Reference: RWMA Resistance Welding Manual Section 5