1. Open up a new image 10x10 pixels. Make sure that the "Transparent" is checked, instead of the "White" option. Look at the image below:
The new image should look like this, when enlarged:
2. Now, you get your Rectangular Marquee Tool() and draw a smaller square outline in the image. Then, right click on the image and "select inverse". It should look like the one below:
3. Now, go to the fill button() and choose black for the color and fill in the border.
4. Well, you're just about done now. Go to Edit->Define Pattern and name it "Grid". Now, whenever you want to insert a grid into an image, just go to Edit->Fill...Pattern. Then you choose your grid pattern from the custom pattern box.