Looking up or forwardSwimming with head too high: Try to always look straight down, with the very top of your head pointing where you want to go. Get a feel for the right position by standing as straight as you can, think very good posture, eyes looking forward. imaging a line going from the sky, through the top of your head, down your spine and down you legs to the ground. You want to establish that same line in the water and swim forward along it.
Your body can act just like a playground see-saw or teeter-totter (that is, if you have a strong core, but that's the second issue - weak core and you bend in the middle, like a broken see-saw). One end goes too low, the other tends to go to high; if your head is high in the water, your feet will tend to go low, unless you kick a lot to keep them up. Your upper body will tend to stay high in the water because of air in the lungs helping that part of the body to float like a filled balloon, and because you work to keep your head close enough to the surface of the water to get air when you need to take a breath.
Sometimes swimmers have to kick a lot to keep their body up and aligned. Nothing wrong with kicking, but you will save a lot of energy if you can use your kick more for forward movement, body balance, and to anchor the lower body so you can get more power out of your pull instead of relying on your kick.
Practice looking straight down when swimming and looking to the side when you breath. Pay close attention to what you see while you swim to help get your head in alignment with the rest of your body. Think - good swimming posture, straight line head to feet - while swimming. There are swim drills that can help with this, like the head point swimming drill. If you are seeing your destination while swimming, then you are looking up too much. If you see the bottom of the pool, then lane next to you, then the lane on the other side of you, you are swinging your head back and forth while you swim instead of keeping it still and aligned.
Swimmer cannot maintain good swimming postureWeak core muscles: You may need to get stronger in the core section of your body, your belly, back, and sides. If you are not strong in the middle of your body, you can't hold your legs up, you fold around your belly and the legs sink. Any exercises you can do to strengthen your mid-section - all the way around, not just abs - should help.
Try to figure out if it is one, the other, or both head position and core strength. Once you know what to work on, you can get better at holding a good posture, legs up in the water, eyes looking down, top of your head leading the way while you swim.