Well, that a very large question.
Take the C major scale, there are seven tones: C D E F G A B.
Each tone is the root for one chord. And each chord is made by superimposing thirds so you have CEG, DFA, etc.
Due to the major scale's structure, you get those chords:
C Dm Em F G Am Bb5. Or, if you consider 4 tones chords:
CM7 Dm7 Em7 FM7 G7 Am7 Bb57.
This is for the major scale. You can do the same with any mode, any scale...