We don't play popular music in all 12 tones as the basis, rather, we use 7 [heptatonic ]as the basis for our music (Western music).
There is 12 tone music (atonal, dodecaphonic). It was pioneered by Arnold Schoenberg. 12 tone music was a 'revolution' that never gained a foothold on the world audience. It is some wild sounding stuff.
To 'filter' out 5 from the 12 to get 7 (12 - 5 = 7), we can use the Major scale pattern, which is 221-2221 or wwh-wwwh, where w = whole step & h = half step. This pattern is simply a learning tool and has no inherent meaning. The keys aren't the way they are because of this series of numbers. It is just a helpful way to derive the tones within a key. And, we prefer the numbers over whole and half. The numbers are certainly easier to say and to remember.
We can think of this as a phone number (dial up the major scale - phone home). There are five 2's in the pattern; therefore, a tone is skipped at every 2 ('eliminating' 5), & leaving 7. By filtering out 5 tones from the 12 while keeping the 221-2221 pattern, we create a key [key center].
A Key is a group of tones, that when sounded in melodies or harmonies, eventually makes one of the tones 'magnetized' to the human ear. One of the tones becomes the tone that is home in our ears. It sounds final, resolved, at home.
When we line up the 12 tones in order, we get what is called the chromatic scale [chroma- is a Greek root meaning 'relating to color' - the chromatic scale is all of the musical colors]. It can start from any of the 12 tones.
For the Major Scale pattern, let's rewrite the chromatic scale from the C tone & then apply our the Major scale filter to see what tones are in the Major scale of C (the Key of C Major).
Any tone of the 12 could be in the 1 position.
This process is repeated for every tone for all 12 tones. These 12 sets of tones that are created through this process make up 15 Major Keys [there are 3 enharmonic keys].
When we work this process, we are deriving the tones of a key. This is called Derivative in contrast to something called Parallel. Derivative tones are the tones within a key. These are also called the diatonic tones. Diatonic means 'across the tones of a key'.
Parallel is comparing the non-diatonic tones [the ones 'eliminated' by the 5 whole steps] to the diatonic ones. This way we have a way of explaining all 12 tones in the context of what we put at 1. Parallel tones are tones that are in the gaps of the Major scale. They are outside, while the diatonic tones are inside.
We can build a linear C Major Scale by starting on the C tone located on the 5th string, 3rd fret. Practice improvising with this scale.