The Selection / Fill tool allows you to draw masks quickly by selecting polygons, mesh elements or UV chunks. Activating the Selection tool displays the wireframe of the mesh as an overlay. Its opacity can be tweaked through the Viewer Settings.
When you are not in Quick Mask mode (shortcut: T), using this tool will fill the current layer with the color currently selected in the Properties panel. It is mostly useful for creating layer masks. When in Quick Mask mode, the tool will only modify the quick mask.