Chords are created when several notes of a scale (or mode) are played simultaneously. A triad chord is made up of the 1st, 3rd, and 5th note of the scale or mode. There are seven triad chords that belong to each major and minor key. Because these chords are made up only of notes from one key, they are called diatonic to that key.
The tonal distances between 1st, 3rd, and 5th notes differ according to the mode from which it is derived. This gives the chords their different sounds and becomes the basis for harmonic movement in a piece of music.
This chart shows the modes that make up the C Major scale. Choosing the 1st, 3rd, and 5th note of these modes creates the triad chords (three-note chords) that are diatonic to the key of C Major.
Music nomenclature (what things are called) can be confusing. In the example above you will notice these chords are called major and minor. Yes, chords are called major and minor and scales are called major and minor. On this website I will try to make it clear which is which by capitalizing the scale name. That is, C Major will refer to the seven-note scale (also known as key of C Major). C major will refer to the three-note chord.