An electric guitar is not one which produces too much sound on its own like a conventional acoustic guitar would. Instead the strings of an electric guitar produce an electric current due to the piezoelectric effect which is used by the guitar amplifier to produce the actual sound. The strings of an electric guitar are connected to what is called a magnetic pickup. These pickups are made by wrapping coils of wire around a magnet. When the string is plucked, it results in a current being induced in the coil, this current is different for each string and depends on how the player has pulled it. The difference in currents is identified by the circuitry in the guitar amplifier which then produces an appropriate sound.
Electric guitars with this kind of construction are able to produce much louder sounds which are also distinct from those of an acoustic guitar. This has led to a complete revolution in music, with the new forms of music coming up and the older ones getting modified.