Vertex shaders are executable programs that execute as part of the programmable geometry pipeline in modern graphics APIs such as e.g. Direct3D or OpenGL. Vertex shaders are usually hardware accelerated on consumer hardware nowadays. The vertex shader processes one vertex at a time, followed by primitive assembly, optionally geometry shader and transform feedback, clipping, and finally rasterization and fragment processing.
Vertex shaders were introduced as an extension to OpenGL 1.3 and as a feature of Direct3D 8.0 around 2001. They were the first step in making part of the render pipeline on consumer hardware freely programmable as opposed to hardwired functionality like the TnL stage or register combiners which until then were at best configurable in some limited way.
The vertex shader is typically the first programmable part of the pipeline. The scope of a vertex shader is a single vertex without any information about the connectivity between vertices or any other vertices and any state set as "uniform", i.e. data that is constant across everything in the current draw call. A vertex shader cannot create vertices nor discard them, and a vertex shader has no local memory or other way that can be used to communicate data from one vertex to another.
After vertices have been transformed by the vertex shader, they are assembled into primitives and optionally processed by a geometry shader, which runs on the scope of all vertices within a single primitive (such as a triangle) and optionally the surrounding vertices.
Resources: