People here who overcame their "fear" of water?

I'm not a big fan of going swimming but, unfortunately, I'm in a training that plans a few swimminglessons this year.
All I remember of my experience with water is almost drowning or not making it back up easy, as in: getting under water but an object blocks my way of making it back up.
So now my swimming lessons are hell. I'm in a class of 44 people, divided in two groups during the lessons, so in a group of 22 for a quarter of the poolspace so we're a bit close to eachother.

Anyways, I won't bother with other information, but my question is: if any of you had a fear of going deep in the water, how did you get over that?
Updates
+1 y
I know how to swim, so that's not the issue. My training isn't swimming it's something else but I have a few lessons that are called "swimming lessons", they just say "do this" and we should do it, if it works or not that doesn't matter.
People here who overcame their "fear" of water?
Post Opinion