You don't want a inductor, you want a electromagnet. Inductors are designed for their electrical properties with the external magnetic field being a byproduct. In fact, some inductors are designed to minimize the external electric field because this can cause interference and stray pickup in some circuits.
Electromagnets are designed to deliberately produce a external magnetic field. This is what you want because you want to interact with a magnetic guitar string.
I haven't seen a lot of deliberate electromagnets available as individual parts. Fortunately, these really are easy to make yourself. You wind some thin wire around a core. The more turns, the stronger the magnetic field for the same current, but also the higher the DC resistance.
For quick testing you can use a small iron or steel (not stainless steel) rod, like a nail. However, a conductive core also acts like the secondary of a transformer and essentially shorts out the transformer at AC. If you just want to make a controllable magnet that will be on long periods of time compared to the switch on time, then a iron core is fine. It will only add extra load when the magnetic field is changing. However, in your case you want to change the magnetic field at audio rates, so a conductive core is not a good idea.
What you want is a ferrite core. Ferrite is a material that does not conduct electricity but is still magnetic. Plain ferrite cores can be bought off the shelf in a variety of sizes. Fair-Rite is one company that comes to mind, and I know Mouser sells at least some of their stuff. A small ferrite rod is what you want.
Once you have the rod, wrap a few layers of tightly space magnet wire around it. This is around #30 wire with thin enamel insulation intended for exactly this kind of application.
To drive this, use a ordinary audio power amplifier intended for driving a loudspeaker. The impedance of your eletromagnet may be lower than the 8 Ω the power amp is expecting, so it might be a good idea to put a resistor in series with the coil, at least for starters to see how things go. A 4 Ω 2 W resistor should do it.
While an "ideal" superconducting inductor would have zero resistance, it does have an impedance, which is a function of the frequency of the driving signal, and thus the current flowing across it.
Put simply, "An inductor opposes any change in current through it".
The circuit needs to be examined in an AC signal model, in which the inductor is not a short circuit at all.
Thus, while a DC signal across the hypothetical ideal 10H inductor would see a short circuit, the supply shown in the diagram is an AC signal of
24 cos 4t Volts.
By computing the impedance of a 10 Henry inductor at the specified frequency, the actual current through it can be determined, and this will not be infinite - it will decrease with increasing frequency.
Edit: Missed the straight wire across the 10H coil.
In the situation where there is a zero-ohm, zero inductance straight wire shunting across the 10H coil, the concept becomes simpler to understand:
The reactance of the wire is zero, the resistance of the wire is also zero (ideal), and since V = I x R, therefore the voltage across that piece of wire = 0 for any defined current io flowing through it.
Since the voltage between those two points is zero, that's also what is across the inductor, or any other component spanning those two points.
We only care about the polarity of an inductor when the polarity of the magnetic field is important.
Such as with electromagnets or common mode chokes and measurement transformers.