The layer view displays all the materials that have textures on the currently selected Polygonal Objects.
Selecting a layer will activate it so that you can paint on it using the Paint Brushes.
When you select a layer it also selects all the same named layers on all the materials on the selected object and activates them for painting, allowing you to paint over multiple materials.
Switching to Global mode will only show the same named layers over all materials allowing you to ignore the fact that you have multiple materials and instead just work as if you have 1 selected layer over your entire object.
Full documentation can be found here.
Available over on Patreon