The two photos above are exactly the same scene with different composition. Rather the first one is 'as shot' by a friend of mine and the second one is a frame I've cropped out of it.
Composition is arguably the single most important aspect which determines how appealing a photo comes out. The example above illustrates the application (and lack of it) of a classic rule of thumb known as the 'Rule of Thirds'. This rule has been popular since the late eighteenth century, when it first originated as a guideline for painting landscapes. Since then people have found it to create a pleasing effect in many forms of visual art such as sketching, drawing and yes, photography.
The Rule of Thirds itself is very simple to understand. It involves dividing the frame into nine equal parts by two equally spaced vertical lines and two equally spaced horizontal lines. Something very much like a game of cross-n-knots! Now to create an appealing effect, the important or powerful elements of the composition, are placed along these lines or their intersections (called power points). For example the horizon placed along one of the horizontal lines, or a mountain peak placed close to one of the power points etc. This is done to create more interest in the image and an overall harmony, than would have been achieved by simply centering the subject.
Coming back to the example above, in the first photo my friend composed the image of sunset with the sun right in the center of the frame and so the frame is divided into almost exactly equal halves horizontally. This is what is a natural tendency, to put the subject of interest in the center. However, if the scene was composed with the sun placed eccentrically to the bottom right, as in the second photo, it gives a sense of harmony and also the sky with its beautiful shades becomes the dominant part of the photo, rather than a totally dark portion occupying half the frame. Keep in mind that there's no 'extra sky' above the sun in the second photo; it is merely the reduction in the dark area that gives a feel of a bigger, brighter sky. After all, the second photo is merely a part of the first one.
Having said all this, there are instances when the Rule of Thirds does not apply, and breaking it may create some really nice effects as well! This is the beauty and very essence of photography, that there are no real rules to it; there are mere guidelines, and one should keep experimenting and develop different styles.
PS: The author does not claim to have complete knowledge or mastery in photography. This is merely an attempt to share a few useful techniques in this dynamic art form.