To start with create a new image with the dimensions 4x4 pixels with a transparent background. Once open zoom in as far as you can go, select the pencil tool and set the thickness to 1pixel, 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. (shown below)

Once you have got your square and you have given it the colour you want (I chose black) then click on the edit menu and near the bottom you will find 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 you like. 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 onto your page click on edit > fill or use the shortcut shift and 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 image 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.
And here is the finished product:

And there you have it, now you can add patterns over text, this can also be done with images aswell. Play around to get your desired effect and learn how to perfect this skill
By Joseph Skidmore