In tonal harmony there are three chord classes: Tonic, Predominant, and Dominant
The Tonic chords usually begin and end your chord progression. You can say they are the foundation or what your progression is based off of.
The Predominant chords usually leads towards the Dominant chords, however can go back (with an exception I will explain later).
And the Dominant chords leads towards your tonic if it is first prepared by a predominant (unless it is a retrogression, but they aren't as common).
So Were Do The Chords Fit In?
(the mediant (iii) is often considered classless, but can prolong the tonic)
So How Would You Use This?
Imagine you start out with just a basic I-IV-V progression (which is used in practically all popular music)
Now this would make for a boring progression if just that was used all the time. So lets do what call prolongation.
I - IV - V - I
With prolongation you prolong the function of that chord, for example you can add a vi to prolong the tonic at the very beginning. Also you can even throw in a V and go back to I.
Also we can use the predominant and another tonic chord to help prolong the tonic.
I - vi - IV - V - I
We can prolong the predominant by using the ii chord. The ii chord is a very strong predominant, so it usually follows the IV chord.
I - vi - IV - I - IV - V - I
You can also prolong the dominant by adding a vii(dim) after it. The vii(dim) chord very much tends to lead towards the Tonic and usually does not go towards any other chord family.
I - vi - IV - I - IV - ii - V - I
So there you go, a very basic introduction to chord classes. This can come really handy, trust me. I would suggest you keep on learning music theory. After learning even the most basic of theory will change how you see music. You stop seeing it as notes on the staff or numbers on a tab, you see the logical progression of chords and other embellishments, you see music.
For a further more in-depth read, I recommend this.