For over 4000 years musicians all over the world have played guitar-like instruments. Categorized as a stringed instrument with a long neck attached to a sound box, the earliest preserved "guitar" is an Egyptian tanbur dated 1500 BCE.
The modern guitar shape started to take form during the Renaissance. By 1860 Spanish guitar builders increased the body size to its presence proportions. While some say it pays homage to the shape of a woman there are acoustic and functional support for the current shape. The large to and bottom allow low frequencies to build as a natural amplifier. The pinched mid-section force acoustic vibration out the sound hole. This gives the guitar the projection it needs to compete in musical ensembles. The shape also allows players a comfortable feels where the guitars stays where you need it and arm motions are not hindered.
Electric pickups began to appear on guitars by the 1930's. With the addition of electronics and amplification it became much easier to play the guitar thanks to lower string heights and small diameter strings.