die Spule
spool
A cylindrical or roll-shaped object onto which something long and thin, such as thread, wire, cable, or film, is wound.
Der Faden auf der Spule der Nähmaschine ist fast leer.
The thread on the sewing machine spool is almost empty.

spool / coil
Loading your saved state.
spool
A cylindrical or roll-shaped object onto which something long and thin, such as thread, wire, cable, or film, is wound.
Der Faden auf der Spule der Nähmaschine ist fast leer.
The thread on the sewing machine spool is almost empty.

You can tell from the context whether a mechanical or an electrical 'Spule' (spool/coil) is meant. Words like 'Faden' (thread), 'Garn' (yarn/thread), or 'Nähmaschine' (sewing machine) point to the roll used for winding. Terms like 'Strom' (current), 'Magnetfeld' (magnetic field), or 'Motor' (motor) point to the electrical component.
Bitte wechsle die Garnspule an der Nähmaschine.
Please change the thread spool on the sewing machine.
When something is or is being wound onto a 'Spule' (spool), the preposition 'auf' is used. For position, the dative is used ('auf der Spule' — on the spool); for direction, the accusative is used ('auf die Spule' — onto the spool).
Auf der Spule ist nicht mehr viel Faden übrig.
There isn't much thread left on the spool.
In everyday life, 'Spule' (spool) is often used in connection with sewing, fishing, or cables. Typical verbs are 'aufwickeln' (to wind up), 'abspulen' (to unwind/play through), or 'einlegen' (to insert), e.g. into a sewing machine.
Wir müssen das lange Kabel wieder auf die Spule aufwickeln.
We have to wind the long cable back onto the spool.
In the meaning as an electrical component, 'Spule' (coil) is a technical term from electrical engineering and physics. In this context, people also speak of 'Induktivität' (inductance).
Eine Spule erzeugt ein Magnetfeld, sobald Strom durch sie fließt.
A coil creates a magnetic field as soon as current flows through it.
role / roll
'die Rolle' and 'die Spule' can both mean a round object that something is wound around. 'Rolle' is more general and fits, for example, paper, film, or adhesive tape. 'Spule' is used more when something long and thin is wound up, for example thread, wire, cable, or film. Learners may confuse the words because both look similar. As a practical rule: with paper, you usually say 'Rolle'; with wire or thread, often 'Spule'.

Für die Reparatur braucht Max eine Spule mit dünnem Draht.
Max needs a spool of thin wire for the repair.
In der Küche liegt noch eine neue Rolle Küchenpapier.
There is still a new roll of kitchen paper in the kitchen.