Graphite pencils come in various levels of hardness. The graphite within the pencil is processed to have different degrees of hardness or firmness. Some pencils are made of firmer or harder graphite, creating lighter lines and shading. Some pencils are made of softer material, creating darker lines and shading.
As an artist or designer, we can select the correct type of pencil for the task at hand. For example, when we start a sketch, we might use a pencil with firmer graphite to draw the light lines of the initial setup of the sketch. After we work out the light lines of the initial sketch, we might want to shade the drawing using a pencil with softer graphite.
The different levels of hardness are called grades. Each grade is assigned a letter and, often, a number identifying the hardness.
Any pencil with an H indicator is on the firmer end of the spectrum. The H stands in for hard. Any pencil with a B indicator, the B stands for bold, is on the softer end of the spectrum. If we want to make light pencil lines, we can select a pencil from the H group of grades. If we wish to create dark lines, we can choose one from the B group.
After the letter, we find the number. The number indicates where the graphite pencil falls on the hardness or boldness scale. The higher on the scale the number is, the stronger that property is. For example, a 9H is a harder pencil than a 2H. If we want to draw with the lightest line we can, we can pick the 9H. On the other side of the scale, a 9B is softer than a 2B. If we want to make the darkest marks we can, we pick the 9B.
Below is a diagram illustrating the different grades and the corresponding labels.
In between the H range and the B range of pencils is a pencil marked HB. This pencil bridges the gap between the two. We can think of this as our multi-purpose pencil. The HB can produce dark enough marks that can do some shading. It can also provide light enough marks that we can create some delicate line work as well.
As a side note, if you have a standard yellow No. 2 pencil, you have an HB pencil. The No. 2 label is just an indicator or label from a different grading scale.
We also can find a graphite pencil in the middle grades with the letter indicator of F. This pencil is similar to the HB pencil in the firmness of the graphite. The F, in theory, can usually hold the edge better or stay sharper for a greater length of time than the HB pencil, though I am sure that depends on the brand and quality of the pencil.