Open PS(photoshop),
Open the photo template
Import the photos you want.
Replace the original photo
Adjust the photo size, orientation, etc.
Save picture
Photo template is usually a PSD layered file made by other users. This file has many layers, and it can also be applied to most photos to change the tone and border.