Electric guitars have pick-ups (a type of inbuilt microphone) and need to be plugged into an amplifier (amp) to be heard.
Acoustic guitars can be amplified by placing a microphone near the sound hole or by placing a portable pick-up on the body of the guitar. This is common for performances at large venues where the acoustic guitar needs amplification to be heard.