All elements on your document can have color, and there are two aspects that can be colorized -- the item's fill, and its stroke.
A fill is a color, pattern, or gradient inside an object. You can apply fills to open and closed objects and to faces of Live Paint groups.
A stroke can be the visible outline of an object, a path, or the edge of a Live Paint group. You can think of it as the outline -- the color around the edge of an item. You can control the width and color a stroke. You can also create dashed strokes using Path options, and paint stylized strokes using brushes.
The current fill and stroke colors are displayed in the Tools panel.
Fill and Stroke controls
You can apply one color, pattern, or gradient to an entire object, or you can use Live Paint groups and apply different colors to different faces within the object.
*From the Adobe Illustrator website
You can create a dotted or dashed line by editing an object’s stroke attributes.