The purpose of slash chords is to specify when the lowest pitch in a chord is not the root note. Often we call this the bass note even though a bass guitar is not playing it. For example, G/B is a G chord with a B as a bass note. When spoken, we call this G-slash-B or G-over-B.
Slash chords are very useful when the composer of the music wants to create a specific bass-line while the chords progress. If they did not do this, the guitarist is unlikely to play the desired chords. Just remember, that slash chords can have different voicings too. They only enforce the bass note of the chord.
The example below shows three examples of slash chords based on the open chord grips for G, D, and A.