The edge detect filter is another convolution. The eight neighboring input pixels all contribute to the output.
In the case of edge detection, the pixel values are subtracted instead of added. Thus a simple derivative is calculated along the x and y axes. Thes differences are combined as a gradient, which highlights the changes in the image, and thus detects edges.