Comping is the Jazz term for accompaniment, which includes the art of complementing the soloist with what you play. To do this you need a good knowledge of chords and how to use them, and you must be familiar with Jazz rhythms and approaches to rhythm guitar.
You also need to be a sensitive listener, with the ability to respond quickly to other musicians. This is best developed through a great deal of listening and improvising.