Takes a certain representation of a Scene, usually as Points (vertices), and transforms this vertices into another representation which is useful for latter processing. For instance, in OpenGL/WebGL, your vertices can be transformed to what is called clipspace, using 4d Homogeneous coordinates, which are then automatically processed to project them as 2d points in the device screen. This process is know as the Camera transform (see also Camera (computer graphics) for further steps)
The 2d pixel coordinates corresponding to the vertices, as well as to all points inside the polygon primitives (often triangles) that go with those vertices, are often passed to the Fragment shader, to decide which color they should appear as.
Here is a common procedure done by a vertex shader, to transform coordinates to those in clipspace: WebGL model view projection.
As explained here, the clipspace coordinates are then transformed to pixel coordinates: gl_Position is the (4d) position of a vertex, while gl_FragCoord is the (2d) position of a fragment.
The operations that happen in between are
In WebGL, one can set the viewport, as gl.viewport(0, 0, gl.canvas.width, gl.canvas.height);
, see here