Comping is a Jazz term with arguably a double meaning: it could mean to accompany... or to compliment. In any case, it comes down to the same thing: to provide support for the musical context one finds oneself in; specifically a vocalists or lead player including soloists.
To quote from an unknown source:
"Comping is the jazz idiom’s stylized term for chordal and rhythmic accompaniment, and there are as many approaches to comping as there are approaches to jazz itself"
Musical context is an important consideration when choosing an appropriate comping approach. For instance, exactly what is the style: Jazz related or not...even different periods of Jazz. An another important consideration:
Is there another chordal player? There is always a risk of chordal players (the compers) cramping each other's style in this situation.
Two possible solutions are to: defer to the other player; or take it in turns to comp on different sections.
And yet another contextual issue: is there a bassist? No point in encroaching upon their territory if they are present: their pitch range and their role. Furthermore, with a bassist present, one can lose the chord roots and focus upon the tensions!
So, yes context is everything!
In regard to Jazz Guitar comping, we must take it back to the beginning; which as far as Jazz and Guitar is concerned, is the Swing era. It is a well known fact that Freddy Green, the guitarist with the Count Basie big band laid down the template for guitarists playing in that style. Namely chord shells played on the beat (four to the bar) with the emphasis upon the rhythmical role rather than harmonic - with the guitarist following the bassist and the ride or hit hat; all pretty much doing the same thing: keeping time!
So, what I will offer you here is an overview of what I consider to be the essentials of Jazz Guitar comping: from the Swing era onwards.

