The Pencil tool is used in much the same way that you would use a real pencil to draw. Simply select the tool and drag on the Stage to draw with the Pencil tool.
SHIFT key : Constrain directions
You can press the Shift key while dragging to constrain lines to vertical or horizontal directions.
Colors
You can specify the color with the Stroke Color Tool.
Color Tools:
Smoothing and Straightening
You can apply smoothing or straightening to the lines by setting a Pencil mode.
Pencil Modes:
Stroke panel : Window > Panels > Stroke
Finally, you can specify line style (solid, dotted etc.), line width in pixels and color using the Stroke panel.