In butterfly swimming it is important to properly position your head and body to avoid neck injuries and swim with good technique and maximum efficiency.
In the butterfly stroke the head is aligned with the spine most of the time. During the inhale, the head can be a little bit lifted to the front but it's really the body undulation that should get the head out of the water.
To avoid straining the neck you should be looking down and somewhat in front of you instead of looking at the pool end.
At the end of the inhale the head goes back in a neutral position again and splashes in the water when the chest drops.
Lying with the face down in the water, the body undulates vertically in a wave-like fashion. To do so, the chest and the head are first pressed down in the water, then released. As they are released, the hips are pushed down, then released in turn and the legs follow along to generate the dolphin kick.
This alternating movement is the base of the body undulation.
If you want to learn or improve this technique, here are some dolphin kick and body undulation drills to do so.