To start with, create a new image with the dimensions 4x4 pixels using a transparent background. Once open, zoom in as far as you can go (1600%), select the pencil tool and set the thickness to 1 pixel (the smallest size), create a square in the center of the new image making sure that you do not fill the whole of the image. You should have something like the example.
Once you have got your square and you have given it the colour you want (I chose black), next click on edit > define pattern. Click on define pattern and then you will get a dialogue box called 'Pattern Name'. Give your pattern a relevant name, something like 'Square'. Once you have chosen your name click OK.
Now you have your pattern saved we want to create a new image, I used the dimensions 300x100 but you can use any size you want. Once you have your image, right click on the type tool and then select 'Horizontal Type Mask' tool.
Use the type mask tool in the same way as you would use the type tool, select the area in which you want the text to appear and then type. The screen will go a light red and your text will show up as white but this is ok. Play with the font size and font until you get the text you want.
Once you have your text on your page click on edit > fill or use the shortcut SHIFT + backspace to open up the fill menu box. Once the box is open from the drop down menu select pattern.
Once you have selected pattern click the little arrow to expand the menu to show you something like the image shown. Select your pattern that you saved previously and then click OK.
Press CTRL+D to de-select the image and view your finished product. There you have it, your pattern applied over your text. Play around with this to get better or different effects.