How 'bout a quick history lesson?
It came into widespread use during the 16th century when a huge deposit was discovered in England. Graphite leaves a dark mark when used to write or draw with but it was so brittle it required a holder.... at first, it was just wrapped in string but later graphite was inserted into wooden sticks (the first pencils!).
In 1795, the French chemist Nicholas Jacques Conté mixed powdered graphite and clay, then formed sticks which were hardened in a kiln. By adjusting the ratio of clay and graphite powder in the formula, the changing hardness of the lead allowed more control of the lightness and darkness of the graphite mark left on the paper. THIS WAS A BIG DEAL! Now artists could vary how dark the mark was (not talking HeWhoMustNotBeNamed marks here) and get so many different effects with just a simple tool.
The higher the number before "H" = the Harder the graphite compound, aka the lighter the mark
The higher the number before "B" = the softer the graphite compound, aka the Blacker/darker the mark
You can really see the difference on a scale like this: