The Pencil tool works primarily the same way in Adobe Illustrator and InDesign. It lets you draw open and closed paths as if you were drawing with a pencil on paper. It is most useful for fast sketching or creating a hand-drawn look. Once you draw a path, you can immediately change it if needed.
Anchor points are set down as you draw with the Pencil tool; you do not determine where they are positioned. However, you can adjust them once the path is complete. The number of anchor points set down is determined by the length and complexity of the path and by tolerance settings in the Pencil Tool Preferences dialog box. These settings control how sensitive the Pencil tool is to the movement of your mouse or graphics-tablet stylus.
For a video on drawing with the Pencil tool in Illustrator, see www.adobe.com/go/vid0039.