The earliest known guitars were made in Spain, and they were called vihuelas. Vihuelas were popular among the upper classes and were often used in courtly music. They were also used in religious music, and they were sometimes depicted in paintings and sculptures of the time.
In the 16th century, the guitar began to spread to other parts of Europe, and it eventually became the most popular instrument in the Western world. The guitar evolved significantly over time, and by the 19th century, it had taken on the shape and form that we are familiar with today.