The same applies to a good photo. There are a few ways to do this. You could use a man made structures ie and building, a window, an arbour or natural structures ie. a tree, leaves etc. Using frames when composing a photo blocks other parts of the image taken and draws attention to the subject.
In this first photo the tunnel has been used to create the frame on the 2 subjects walking towards the light.
Trees are used for the frame on this picture. The viewer wants to know what is going on around the photo it is intriguing to the eye.
Trees and foliage again create the frame. It frames the subject which is the marvelous view of the beach.
In this photo of the cliff are used loosely as a frame. It draws the viewers eye down the river to what might be around the corner.
The climbing ropes make a great frame for a portrait.
In this photo a window in a telephone box makes the frame
Using a frame helps the viewer see where the photos taken and gives the photo some context. It can help create depth and layers. It draws the eye to look at the focal point of the shot.
So the next time you take your camera out consider using a frame for a simple but stunning composition idea.