The title of Lorca's poem acts as a leitmotif does in a musical composition. In other words, the image of the guitar becomes part of the extended metaphor in which the emotions of the speaker's heart are compared throughout the poem. As the guitar represents the heart with those figurative "heartstrings" of which many speak, there is certainly a strong sense of musicality in this comparison, as well.
It is not difficult to understand this lengthy comparison with the suggestion of the title and the musicality of the verse and the overt expression that the guitar "weeps." In fact, critics often make mention of what is known as the "deep song" permeating Lorca's poetry. This plaintive music of the Flamenco and Gypsy culture--music that Lorca enjoyed and found not dissimilar to the Blues played on guitars in Harlem when he once visited--lends itself well to the expression, for instance, of his nostalgia for his home of Andalusia:
It weeps for distant
Hot southern sands
yearning for white camellias.
"Guitar" is a very poignant poem as its emotive language and musical tones clearly speak to the soul, especially in the final exclamation:
Heart mortally wounded
by five swords.
Here the metaphor of the guitar as the heart of the speaker is overtly stated. The heart/guitar is "wounded" by the five fingers ["swords"] which pull at its melancholic strings.