The Polyline tool allows you to create a line or a shape composed of multiple segments by defining each point in the shape one by one. This tool works similarly to the Pen tool in picture editing software.
The most basic approach to using the Polyline tool is to simply click where you want each point constituting your line or shape to be created. Straight line segments will appear between each point you create, making a segmented line or a straight shape.
If you want your line or shape to have curves, you can then click and drag on the line segments using the Contour Editor tool to make them into curves.
Using a more advanced method, you can create curved lines directly with the Polyline tool. To do this, you must hold the mouse button down and drag the mouse cursor when you click to create a point. This will create the point's Bezier handles, which will influence the curve for the segment before and after this point. Hence, as you drag out these Bezier handles, you can see the influence it has on the line segment you just created, but you won't get to see its influence on the next line segment you create until you create the next point.
Regardless of how you use the Polyline tool, you can always tweak the lines and shapes you have created using the Contour Editor tool. Using both tools together allows you to create complex straight and curved shapes with all the precision you need.