How Shaders Work in OpenGL - hls333555/OpenGL GitHub Wiki
The most commonly used shaders are vertex shaders and fragment shaders(aka pixel shaders), there are also other types of shaders including tessellation shaders, geometry shaders etc.
For simplicity, when a draw call is issued, the vertex shader will get called once for each vertex that were trying to render, then the fragment shader will get called once for each pixel in the triangle that needs to get filled in, then you will see the result on the screen.
The primary purpose of the vertex shader is to tell OpenGL where the vertex to be in the screen space. It has nothing to do with color or lighting etc.
The primary purpose of the fragment shader is to determine which color the pixel is supposed to be.
Check this for further information on how shader works.