Making a photo takes knowledge, composition is a part of that knowledge.
One of the best ways to learn how to build a photographic composition is to see how classical master painters painted their canvases. Photography is a visual art form and many of the rules and techniques that are applicable to painting are also applicable to photography.
Some of these rules are discussed here.
The Rule of Thirds, this is a very common and often used rule in photography. The subject is placed around one third to the corner of the frame either on the left or the right. The way it is done is by imagining that there are two sets of parallel line running left to right and top to bottom of the screen. These lines divide the frame into 9 equal squares. And therefore there would be four intersecting points. The idea is to place the subject on one of the four points.
The right composition should also be an attempt to include only elements that add to the image and exclude everything else that does not. How do you do that? There are many techniques that you can use to achieve that. Using selecting focusing technique is one of them. Selective focusing is the technique where you use the ability of your lens to use a wide aperture to selectively bring only a small part of the image in focus while blurring everything else.
Additionally, the right composition should immediately draw the viewer's attention towards what is the main subject of interest. And in that earnest one technique that is commonly used is Leading Lines. Leading lines is a sort of visual aide for the viewer leading towards the main subject of the image. Leading lines do not always have to be a line for that matter. It can very well be a series of rocks on the beach, leading up to a lighthouse or a fence that leads up to a windmill.