IN PHOTOSHOP CS
Create a new document with desired dimensions.
Choose the textmask tool (the one for horizontal text - the textmask tool is under the regular text tool) and set the parameters for font and fontsize and style.
Type whatever text you want.
Press Enter. You now have a selected textmask.
Open the document with the image and select the wanted portion from it. Copy.
Go back to the original document with the textmask.
Choose Paste Into from the Edit menu.
By choosing the Move tool when that layer - which is created automatically - is chosen - you can move the image inside the text to your desired position.
This text is not editable and not - as far as I know - movable (if anyone knows how to move it, tell me please). You can however use any layer effects there are in Photoshop on its layer, like shadows, feather, distortions of any kind. And of course blends and the rub.
Federico Platon provides a much easier way to do this in Photoshop CS (Thanks Federico!):
1. Open an image file.
2. Double click the layer (rename it in order to allow it to move up and become a regular layer instead of a background layer the background layer is locked).
3. Now with the type tool, type some text.
4. When you are happy with the textsize, typeface, position etc., move the textlayer beneath the image layer in the Layer palette.
5. Now select the image layer in the layers palette and choose Create Clipping Mask in the Layer menu at top of window. Or even faster, just click in the Layers palette between the two layers while holding down the Alt/opt key.
If you need to adjust the position of the "mask", use the Move tool in the Type layer. Or if you need to edit the text, select the type layer and use the type tool.
The mask is vector data, which is resolution independent so it prints sharp. If you need to place the image in InDesign CS, export it first as PDF from Photoshop CS in order to not rasterize it.