Swim flat like a surfboard! Rock side to side like a boat! Roll your shoulders like the wings of an airplane! While each of those tips has its place, if you tried to implement all of them, you'd be tied up in a knot—and that's not a good place to be in the water.
So, which is it?
I wish there were a simple, definitive answer that would help clarify things for you, but alas each of these approaches could be correct, depending on what you're training for—pool, open water, casual fitness, etc. Assuming you are an open water swimmer, or at least training toward an open water triathlon, let's focus exclusively on the mechanics I've found most successful and efficient in that setting.
Hint: It's all in the hips.
Body rotation should begin with the hips. A simple visual is imagining your spine as your central axis, floating on top of the water. In an ideal stroke, your entire body will symmetrically roll side to side around this axis with connection from shoulders to hips. This marriage of shoulder and hip drive is imperative for many reasons, and we will explore each closely.
Perhaps the most common error in swim mechanics involves a swimmer who cranks the head to clear the waterline for the breath. Not only is this unnecessary stress on your neck, it's indicative of various timing issues and a lack of body rotation from the hips.
Picture yourself lying flat in the water and the degree of head turn required to clear your mouth above the water. Now, visualize the same breath with a body effectively rotated 45 to 60 degrees to that side. Easier, right? Focus on minimizing head movement throughout the stroke cycle, allowing the hips to roll the body to the side for each breath. This consistency and stability throughout the spine will also help maintain proper alignment from head to toe, further helping to create a clean pocket of air next to your face each breath.
Symmetry is Key
The feeling associated with a clean rotation from hips to breath is quite intuitive, in the sense that the reward is a clean pocket of air from which to inhale. It's common for swimmers to lack this rotation on the opposite side hip during the exhale, though, creating a lopsided stroke.
To help quantify this, it's common for a swimmer to spend about one second rotating your left hip down during the breath to the right side, and often less than half a second rotating the right hip back down during the exhale. This lack of symmetry creates a hitch, and consequently a slew of problems.