Paul is right, it's done using a layer mask.
To be more specific.....
Open a document.
Give it a BG color, I used white.
On a new layer use the Rectangular Marquis Tool to create a band across the doc.
View attachment 62475
At the very bottom of the layers panel create a new layer and use the Type Too to create your text.
Turn off the text layer.
Select the 'band' layer.
Now mouseover the text layers thumbnail.
Hold down the Cmd/Cntrl key and click once on the text layers thumbnail.
You should have a selection that looks like this:
View attachment 62476
Select your 'band' layer.
Click the 'add layer mask' icon located at the bottom of the layers panel to add a layer mask to the 'band' layer.
Your image should now look like this.
View attachment 62477
Now open the image you would like to use and place it between the BG layer and the 'band' layer.
View attachment 62478
Now select the layer mask on the 'band' image by clicking on it once. It should now have white brackets around it.
Choose your Brush Tool.
Use a fairly hard brush (85).
Set the brushes color to black.
On the layer mask, begin brushing out the out line of your image.
You can change the brushes color to white (X key) to fix areas that you go to far with.
View attachment 62479
View attachment 62480