Accompaniment is the musical part which provides the rhythmic and/or harmonic support for the melody or main themes of a song or instrumental piece. There are many different styles and types of accompaniment in different genres and styles of music. In homophonic music, the main accompaniment approach used in popular music, a clear vocal melody is supported by subordinate chords. In popular music and traditional music, the accompaniment parts typically provide the "beat" for the music and outline the chord progression of the song or instrumental piece.
The accompaniment for a vocal melody or instrumental solo can be played by a single musician playing an instrument such as piano, pipe organ, or guitar. While any instrument can in theory be used as an accompaniment instrument, keyboard and guitar-family instruments tend to be used if there is only a single instrument, as these instruments can play chords and basslines simultaneously (chords and a bassline are easier to play simultaneously on keyboard instruments, but a fingerpicking guitarist can play chords and a bassline simultaneously on guitar). A solo singer can accompany themself by playing guitar or piano while they sing, and in some rare cases, a solo singer can even accompany themself just using their voice and body (e.g., Bobby McFerrin).
Alternatively, the accompaniment to a vocal melody or instrumental solo can be provided by a musical ensemble, ranging in size from a duo (e.g., cello and piano; guitar and double bass; synthesizer and percussion); a trio (e.g., a rock power trio of electric guitar, electric bass and drum kit; an organ trio); a quartet (e.g., a string quartet in Classical music can accompany a solo singer; a rock band or rhythm section in rock and pop; a jazz quartet in jazz); all the way to larger ensembles, such as concert bands, Big Bands (in jazz), pit orchestras in musical theatre; and orchestras, which, in addition to playing symphonies, can also provide accompaniment to a concerto solo instrumentalist or to solo singers in opera.