Half steps & whole steps — the ruler
The smallest possible distance between two notes is a half step; twice that is a whole step. The system needs no other step sizes — anything larger is a series of these two.
This is where the five missing notes from the previous section come in. Between most letters sits a half-step note in between — the black keys on a piano. At only two places do two letters sit directly next to each other with nothing between them: B to C, and E to F. Seven letters plus five in-between notes make twelve.
On a guitar this system is laid out visibly: one fret is exactly one half step. Moving up a single string fret by fret runs through all twelve notes in order; after twelve frets the starting note returns. The fretboard is the ruler of pitch — every fret a half step, every second fret a whole step.
Because the names repeat, the same note sits in several places at once. A C isn't a location, it's a name that shows up all over the neck, on every string in a different position. This looks confusing at first, but it's the practical advantage of the guitar: the same melody and the same chord can be played wherever the hand is most comfortable.