First, open up the image you want to use in PhotoShop. We will be using the following image:
Now choose the text tool and write on top of the image. It's good to use a font that has significant weight to it, so that enough of the image will be shown through the text. It should look like this:
Next, we will add to the text layer's Layer Styles - either double-click on the layer or right-click and choose Blending Options. We will add a Drop Shadow and an Inner Shadow - you may want to experiment with the settings, and maybe add more Layer Styles, depending on your chosen image.
After the Layer Styles are applied, we should have something like this:
Next, look at the Layers palette, and notice the Fill option just below the Opacity. We want to reduce the Fill of the text layer down to 0%. This is ensure that the contents of the layer are not visible, but the layer styles still will. The image will now look like this:
The image is now visible inside the text. We can tweak the effects slightly, by setting the Fill to 20% or so, and changing the blend mode of the text layer, such as Color Dodge:
Using this as a guide, you can tweak the settings to provide different results. Experimenting with PhotoShop is very much advised, as many many results are possible.