Let's look at diatonic notes starting from C. The white keys of the piano. These are the notes of the C major scale, and a similar geometry of intervals exists in all keys, it just starts from a different note and the white/black key distribution isn't so simple when you start elsewhere. The piano keyboard has been deliberately designed so that it is easy to play diatonic things in the keys of C major and A minor.
If there is a black key between two white keys, for example C and D, the interval i.e. pitch distance between those keys is one whole tone, denoted as "w" in the picture below. If there is no black key between two white keys, for example E and F, the interval i.e. pitch distance between those keys is one semitone. One whole tone equals two semitones, so you can call them Whole and Half. (Don't ask why the distance between E and F, and B and C is only "half" when it's a full scale step, that's just the way it is.)
Diatonic chords are constructed as stacks of thirds, i.e. by taking every other note of the scale. Scale degrees 1, 3, 5 are the first chord. Scale degrees 2, 4, 6 are the second chord etc. Such a jump, skipping over one scale note, is called a third. A jump encompassing three notes in the scale. C, D, E : three different note names, so a "third". The jump from C to G is ... C, D, E, F, G: five different note names, so it's a "fifth".
Here is the first such chord in the C major scale:
As you can see, it starts from C, and the first interval in the chord, from C to E, is two whole tones. Which is four semitones. 2+2=4. The note E is called the "third" of the chord. Yes, it's the second note of the chord, but it's the chord's "third". Sorry about that. The jump C-D-E is a third, but C-D-E-F-G is a fifth.
When a chord's third is four semitones, it is a major chord. When a chord's third is three semitones, it is a minor chord. Major = larger. Minor = smaller. Four is larger than three.
Let's take the second chord of the scale:
As you can hopefully figure out, the jump from D to F is three semitones. It's not actually rocket science, even though it seems to be so incredibly difficult to understand, based on the utter confusion people have over it. From D to E, there is a black key, so it is a whole tone, i.e. two semitones. From E to F, there is no black key, so it is one semitone. 2 + 1 = 3. Three semitones means a minor third, which means that the stack of two consecutive thirds starting from D is a minor chord.
Count the semitone jumps from D to F: ... 1, 2, 3!
In the D minor chord, the jump from D to A, just like the jump from C to G, is a fifth. And it's seven semitones, a "perfect fifth". So, what makes a major and minor chord different from each other is the third.
Now there's just the one different case, B diminished.
From B to D, the distance is three semitones. And from D to F, like we already saw, it is three semitones i.e. a minor third as well. A chord with two stacked minor thirds is called a diminished chord. The fifth in a diminished chord is only 6 semitones, as opposed to the 7 semitones of the major and major chords, and that's why it's called "diminished".
Ok. But where does the other list come from? If you start building the list of chords from the A note instead of the C note, you get the second list. The first one is a minor chord, A - C - E. Then a dim chord, B - D - F. Then a major chord, C - E - G. Etc.