You consider each pixel in the image (or in the window) and get an average from the 8 surrounding pixels. Save that average in a 'buffer' array.
In the image below I've shown P as the pixel being considered and labelled three of the surrounding cells with their co-ords. Average all 8 and save in your buffer array - shown as P'. Now consider the next pixel (to the right of P) and do the same for that.
Eventually your buffer will be full of these average values and at that point, replace the image with the values from the buffer and start the sequence again - each step will blur the original more.
As I mentioned before, you need to take care of the cases where P is at the edge of the image and the usual way is to wrap around.
To make things easier you
could just do the above with two arrays to begin with rather than messing around with images which will take more work. If you println() the two arrays you'll be able to see when it's going right :)
EDIT: This way it doesn't matter whether your image is odd or even sized :D