The pencil is a tool for writing that has a core surrounded by wood. The pencil is not made out of lead despite the German name “Bleistift” (Blei means lead). But lead also leaves a gray line.
One used to actually make the pencil out of lead, but for over 100 years they make the core out of graphite. Graphite is a type of coal.
The cores of pencils come in different degrees of hardness. For geometric sketches one uses harder cores. These are labeled as “H”. For freestyle sketches softer pencil are recommended. These are labeled as “B”. The normal pencils, the ones in schools, are in the middle, labeled ”HB”.
What advantages do pencils have?
A pen’s ink only flows from top to the bottom, so if you wanted to write on the ceiling it wouldn't work. Ink also doesn't work if it is cold. Pencils don’t have these problems.
The lines of the pencil barely blur. One can also use an eraser to erase them. That is not possible with ink. Because of that, kids usually use pencils in school when they learn how to write.