Z-buffer Algorithm
Imagine that in 3D all the geometry has been tessellated into triangles. Consider a single triangle (and there are many) entering the depth buffer pipeline stage.
Let d[x][y] be current depth of the pixel at (x,y).
Consider a triangle projected onto the surface.
for each pixel p in the triangle
if ( depth(p) < d[x][y] )
draw p
d[x][y] = depth(p)
The algorithm is really simple but its consequences are not.
As a consequence of transforming or projecting lines and planes as points coherence can be used. eg the scan line algorithm knows the lines endpoints and draws the line. Essentially interpolation between points.
depth coherence is interpolation of depth, face coherence is interpolation of points normals, light intensity (or light normals if Phong available) and other material properties.