A good way to see where this comes from is to note that the major scale with C as the tonic ("root") note is
C D E F G A B
C = C E G (skip D, take E, skip F, take G)
Dm = D F A
Em = E G B
F = F A C
G = G B D
Am = A C E
Bdim = B D F
You can take four notes at a time instead of three to get seventh chords.
I've been playing for quite some time, and have also known bits and pieces of theory for about the same amount of time, but I've never really applied the latter to my playing until recently. I'm getting into playing Bach and so on and find that I'd really like to understand, e.g. Roman numeral analyses, and being fluent in basic theory and how it "looks" on your instrument is key to this.