Vertex shaders and pixel shaders — called fragment shaders in OpenGL — are small programs that run on the graphics card rather than the CPU. A vertex shader executes once for every vertex in a 3D mesh; a pixel or fragment shader executes once for every pixel being drawn.
The point of putting them on the GPU is that both operations are massively parallel. A mesh with a hundred thousand vertices and a frame with two million pixels means millions of identical small calculations, which is precisely what a graphics card is built to do and what a CPU handles badly.
They sit inside the rendering pipeline, driven through either the Direct3D or OpenGL API, and they're what made per-pixel lighting, normal mapping and most modern visual effects practical in real time.