Getting better at swimming is a lot like baking chocolate chip cookies. When you first start learning to do it, it's important to follow a recipe, even when you have a pretty good idea of what you want to accomplish.
Once you completely understand the basic recipe for an activity like swimming or cookie baking, it gets easier to be a little bit more adventurous. Maybe you want a slightly softer cookie, or you want to learn how to compete in open water swimming or triathlons. When you have that basic recipe down, it's easier to understand how to "hack" the recipe to better suit your needs.
According to the general "recipe" for swimming freestyle, lifting ones head up out of the water is a big no-no. The reason for this is fairly simple—when you lift your head out of the water, your hips sink. This makes it really difficult to swim with any sort of efficiency or endurance.
In pool swimming, this is rarely an issue. One of the first techniques swimmers learn is to look down as they swim, navigating based on what the bottom of the pool looks like.
In open water, it is nearly impossible to navigate based on the "bottom" of the watercourse. As such, a different navigational system known commonly as sighting must be used.
To sight, a swimmer lifts their head out of the water and scans for predetermined landmarks along their course. By doing this periodically during the swim, the swimmer can ensure that they stay on course.
For a newer swimmer, this can be fairly difficult, because again, doing it causes the swimmer's hips to sink. As such, it's really a more advanced skill that's better to learn after a swimmer has mastered "the general recipe" for swimming freestyle.
Once you have mastered this general recipe for swimming freestyle, modifying it so that you can navigate by above water sighting is fairly easy. It's really not that different from introducing new ingredients into that chocolate chip cookie recipe. You simply have to compensate for the new sighting technique in other ways.
The key issue to remember when you are sighting is that as soon as you lift your head out of the water, your hips are going to begin to sink. This means that you must adjust your body position and your kicking and stroking technique to compensate for a lowered hip position.
Generally, there are two ways that swimmers do this. One way is by modifying their stroking and kicking technique, and maintaining a good head position as they sight.