I probably use this rule of composition more than any other; It’s the rule of thirds.
It works as long as your subject lands roughly near the 1/3 lines; it doesn't have to be exact. It depends on the rest of the composition and what you want to include in the background. but it can make your compositions more interesting and it can give your subject a set-apart, special feeling, as your eye travels around through the luxurious space in the image and finally lands on the subject.
The idea is to mentally divide your image into 3 sections and either put your subject close to the intersection of those lines or, if you’re shooting a landscape, assign the different elements of your scene to fall on the one third or two thirds lines.
Putting your subject on the intersection of the lines doesn’t have to be precise, it can just fall in the general area.
The water in this beach scene takes up the bottom third of the image, and the sky fills up the top two thirds of the frame. The heron falls close to the first one third vertical line.
Sometimes you have to take other elements into account as well; for instance, I wanted the bridge to look symmetrical, so my beautiful subject doesn't quite fall on the intersection of the lines, but the composition is still pleasing.