The sound of an electric guitar is produced when the guitar senses string vibration electronically and directs a signal to the amplifier. The movement is sensed electronically by a magnetic pickup which is located on the guitar body under the wire strings as shown below:
Photo: Electromagnetism at work: a closeup view of the pickups under the strings of an electric guitar. Photo by Arif Patani courtesy of US Navy.
The pickup of an electric guitar is basically constructed of a bar magnet that is wrapped with thousands of turns of coil fine wire. The magnets produce a magnetic field that is transferred through the strings. This causes the metal strings to turn magnetized, and when strummed, the vibration created induces a small electric current that flow through the wire pickup coils. The signals from the pick up coil are then sent to an amplifier, who as the name implies amplifies the sound and sends it to the output, that is usually a loud speaker. The following diagram shows the layout of the process.
i. The grey bar magnet (1) creates a magnetic field round itself.
ii. The magnetic field lines (2) expands imperceptibly upward through the metal guitar strings that are situated over the pickup.
iii. The brown Guitar string (3) close to the gains magnetism by the magnetic field. When the string is strummed or plucked (vibrates), it creates its own magnetic field.
iv. The yellow coil wire (4) that is wrapped over the pickup, senses this magnetic field. A minor electric current is generated in the coil due to the magnetic field.
v. The amplifier (5) boost the low input signal so as to make it powerful enough to drive a loudspeaker.
vi. the loudspeaker (6) transforms electric current into sound that we can hear and enjoy.