There is no such thing as a "slash chord" but I'm assuming you mean chords notated like C/G and D/F#. This notation means that the chord has a different bass note than its root, and the bass note is after the slash. Using a different bass note is called inversion. 1st inversion chords use the second note from the root (for the C chord, for example, this is E) as the bass. 2nd inversion chords use the third note, and 3rd inversions use the fourth, if there are four notes, such as in a seventh chord. C/G is a second inversion chord because the third chord tone is used (C-E-G are the tones in the C chord)
In contemporary music, you can use this in your composition when you want to smooth out your bass line, so it's not full of wild leaps. You can also use an inverted chord to weaken a chord that has a strong pull to another, like C has to G. In fact, changing C to C/G means that, in a progression including C and G, the bass line does not move when you go to the G chord! You can have some fun with this concept.