The horizon is a straight line which divides the earth and the sky. It also is a very dominant photographic feature. It is like the first stroke of a painter that determines everything else that follows.
What you do with the horizon, where you place it in your photo and what you do with objects relative to the horizon is decisive for whether a photo works (or doesn't work). Ultimately, you want to use this strong straight line to your advantage by trying different viewpoints and framing.
While dividing a composition in half by placing the horizon in the middle of the image is usually considered taboo, breaking the rules often works well.
In the second photo, the middle placement immediately draws the eye to the line of people, while a shallow depth of field accentuates the distance between the people at the front and at the back.
Placing the horizon high in the frame accents foreground details and enhances the sense of distance. It can emphasize the three-dimensionality in your photo, if the landscape sweeps back towards it. Or, if the foreground is the main concern and there is a dominant foreground subject, putting the horizon high places the emphasis on that subject with the sky out of the way.