About Pencil Modes
The Pencil tool creates central lines as you draw on vector layers, adding each stroke on top of the previous ones.
When you select the Pencil tool, the Tool Properties view displays the different Pencil modes that control how the pencil line is drawn.
Draw Behind Mode
When enabled, your brush strokes will appear behind the existing artwork. Note that they will appear over your artwork while drawing your stroke, until you release the brush.
Auto Flatten Mode
When drawing on vector layers, lines do not usually become one object. The Auto-Flatten mode automatically merges lines created with the existing ones into one single object as you draw.
When drawing on a bitmap layer, you are laying down the bare pixels, so they are always flattened. You can no longer access the individual stroke after you draw it.
Using the Select tool, you can use select and remove a segment of flattened pencil lines. Overlapping pencil lines drawn with the Auto-Flatten mode are essentially cut into segments by the overlap and can be treated as individual lines.
Auto Close Gap Mode
When using the pencil tool, you can automatically close strokes with an invisible stroke.
It is recommended to keep this option enabled when drawing with the Pencil tool.