Have a look at the magnetic field created by a bar magnet. Then look at images or video of the sun in certain wavelengths.
The sun has powerful magnetic fields that store energy. We're able to see those fields because charged particles spiral around magnetic field lines.[a]See [a] below.
That energy can be suddenly unleashed, forcing charged particles through the solar system, sometimes toward earth.
When those particles interact with the earth's magnetic field, they both spiral around the earth's field lines, and distort the earth's field. And the act of changing a magnetic field creates an electric field [b]See [b] below.. If there are any conducting materials around, this produces a voltage that will affect circuits connected to them.
A charged particle through a magnetic field experiences a force given by F→B = qv→ × B→ where F→B is the magnetic force on the particle with charge q moving with velocity v→ through the magnetic field B→.
This uses the right hand rule for cross products, which requires you to think three-dimensionally.
Combine that with ΣF→ = ma→ and a bit of first-semester physics, and you can see why the particles spiral around the magnetic field.
A changing magnetic field creates a voltage across a single conducting loop (such as a connection from overhead wires, through a telegraph station, to the ground, to the other end of the overhead wires) according to V = -d/dt{BA cosθ} where the voltage produced V depends on how quickly there are changes in: the magnetic field B caused by something other than the wires themselves (in this case, the earth's magnetic field), the area A that field passes through, and/or the angle θ between the magnetic field and the "normal"[*]From the Latin norma for "carpenter's square" which carpenters use to make sure things are perpendicular. Never call it the "natural line" or "usual line" - it has a totally different meaning. I teach my students to build an autocorrect function into their brains: "normal" → "perpendicular". to the area.
In the case of telegraph wires connected to two stations and the ground, the area is very large [*](several kilometers/miles of cable, several meters/yards above the ground), so you might think this voltage would usually be large. But most of the time, the earth's magnetic field changes strength and direction so incredibly slowly that this voltage is not worth bothering with.
However, during a solar storm, the charged particles from the sun can cause the earth's magnetic field to change strength and direction rapidly enough that this voltage can create sparks. So, wires themselves don't catch on fire - but flammable things near the wires can be ignited by the sparks.