Impedance (Z) is resistance as measured in the the alternating current domain, measured in Ohms. Resistance (also Ohms) is resistance to current flow in a DC circuit, and is linear. Impedance is resistance to current in an AC circuit (audio is a/c), and is not linear. Impedance changes with frequency, and the sensitivity to frequency change is called reactivity.
In terms of musical instrument circuits you have to consider the output impedance of a device, and the input impedance of the device it is sending signal to.
Typical output impedances:
Active electronics* (onboard preamp): Low Z (hundreds of Ohms)
Passive electronics: High Z (thousands of Ohms)
Piezo pickup: Very High Z (millions of Ohms)
Input Impedances:
Mic Pre: Low Z (Tens of Ohms)
Stomp Box: High (Hundreds or Thousands of Ohms)
DI Input: Very High (Thousands or Millions of Ohms)
*many active devices, like operational amplifiers used in active circuits, have high input impedances and low output impedances, and that can be useful.
When you connect two A/C circuits, you have each acting as a "load" on the other. When the loads are matched you get the best transfer of power (V and I). But in cases where the power level is very low (guitar outputs) there are advantages to a mismatch: a low or high output impedance feeding a circuit with a very high input impedance. The source (bass/guitar) doesn't load the destination (preamp, buffer amp...) and the circuit behaves in a more ideal manner. Also, that non-linearity of the impedance changing with frequency is minimized when the circuit is designed properly.
What you want to avoid is high output impedance into low input impedance. The result is poor frequency response and poor transfer of power. Since passive basses are fairly High Z, they want to see a similar High Z input, and in some cases, the higher the better. That is why you might use a line driver or a buffer amp as the first device in a pedalboard, for instance. You might think of it as the high impedance source (passive bass, piezo...) "loading" the low impedance input.
Lastly, a transformer is an impedance converter. It uses electromagnetic coupling to either raise or lower impedance. Again, not linear, and that can be useful if you know how it works, and you like the way it sounds.
On a gain sensitive device like a fuzz, a filter, a compressor... you may not get the intended result, or may need to work out all new settings, if your instrument is different than what the designers expected. This usually has more to do with gain than impedance, but since there is some correlation between them in typical devices (i.e. low-Z circuits providing more signal), and that could lead to a confusion between gain-related mismatches and impedance-related mismatches.