A clipping mask is an object whose shape masks another artwork so that only areas that lie within the shape are visible. Today we will see how to create a clipping mask in Photoshop.
Open your photo with Photoshop. Now go to the Layer menu and click New > Layer from Background. Click OK. Now you could see on the Layers panel that the Background layer has been changed to Layer 0.
Now we can add a new layer above it. Go to the Layer menu and click New (or Press Shift+Ctrl+N). Before proceeding to the next step we can hide the Layer 0. To hide the layer please click on the "eye" symbol.
Select the Layer 1. I'm now drawing a shape on the Layer 1. Now the Layer 1 becomes Shape 1.
Select the Layer 0 and simply drag it over the Shape 1 (or you can go to the Layer menu > Arrange > Bring to Front). Click on the "eye" symbol to make the Layer 0 visible. Make sure that now the Layer 0 is selected.
Click on the Layer menu and select "Create Clipping Mask". Now you can see that your photo is inside the Shape layer. You can easily move the photo inside the Clipping Mask with the Move Tool.
So here is the final image: Merge the visible layers and save the image as .png.