For the Apollo Guidance Computer, changing the program meant manually re-weaving wires through or around tiny magnet rings. A good part of the cost of the computer was the time spent painstakingly weaving the wires to store the program.
https://en.wikipedia.org/wiki/Core_rope_memory input wires were energized, and they were coupled (or not) to the output wires depending on if they shared a magnetic ring (or not).