The pencil tool is a great tool for creating freeform shapes and lines in Adobe Illustrator. Select it from the tools dialog box and click and drag to draw. If you do not see any lines after unclicking when you are finished drawing, the stroke may be set to zero. Alter it in the stroke panel while your path is selected to get a thicker or thinner line.
If you draw a line and would like to extend it or alter it, you can join a new line to it. Make sure the first line you drew is selected with the direct selection tool and then begin to draw along the end of the original line with the pencil tool to extend it into a new direction.
You can also begin drawing along any other point of the line and do this. This will reshape the line into the direction of wherever you began drawing you line. In this example, the pencil tool is used before the end of the original line.
This effect can also be applied to other shapes, which can be incredibly useful in altering shapes you created with the pencil tool or preset shape tools. In this example, I created a rectangle with the rectangle tool, selected it, and then drew an addition to the top of it with the pencil tool, starting at the upper left corner of the rectangle path.
The pencil tool will automatically adjust the lines you draw to make them look smoother. If you double click the pencil tool icon in the tools panel, you can view the options for the pencil tool’s fidelity.
Here are two lines, one drawn with fidelity all the way up to “smooth” (seen on left) and one with fidelity all the way down to accurate (seen on right), meaning closer to what you actually drew with the tool. As you can tell, the smoother setting adjusted the path much more.
If you are drawing many shapes which you want to fill with a color, this options box also has a check box to automatically fill drawn paths with color.
You can also use the pencil tool to draw straight lines by holding the Option key (mac) or the Alt key (windows). You can do this while in the middle of drawing you’re path, too, so if you draw a squiggly line and then start holding down the option key, you can continue that line in a straight direction, let go, and then continue drawing the same line back as a freeform path. Here I drew a shape where I used the option key twice in drawing my path, while drawing freely around to make the more circular part of it.
And those are the basics of using the pencil tool in Adobe Illustrator.