Navy Seals in the US military are one of the most elite forces in the world. Now I'm not a Seal, and not even in the military so take this post with a grain of salt. Also do not try anything without someone with you (like a lifeguard on duty!).
How they train is something we can model after, even if you are just a beginner swimmer I am sure there is something to gain from this. If you are an advanced swimmer, this very well may be where you take your training next!
Why + Philosophy:
The training is just as much psychological as it is physical, as the Navy's philosophy is that you need to be able to act under pressure. No pun intended, as the literal pressure under water can be overwhelming to the uninitiated.
You have to be able to be there for your fellow soldiers, and if you fail to do the basic physical stuff, or you break down from the psychological. Then you will fail your people to your left and right. That is their philosophy and logic.
How + Physics:
I'm not a Seal, and I haven't done this training... However here is how I think you could put these strategies into place in your regimen.
This is something that I have spent a bit of time with myself, and have even implemented in a micro way with my swim lessons. When you sink you have to release your air, and sometimes all of it. That initially causes you to panic, and you want to get to the surface asap.
However that is not what you want to do, nor is it the response you'd want to have. The more controlled sinks you do, the more comfortable you'll be under the water, and with having less and less air.
The exercise is to essentially tie your hands and feet together (you don't have to actually tie them, just interlock your fingers for example), then sink down by blowing out of your NOSE. Sink until you reach the floor. I think the Seals do this in a 9-15 ft pool, I've done it in 10ft myself.
Start off with just 10 times, but each time you do it the more you're gonna want to rush to the surface. You sink down then gently push back up, NO SWIMMING, and then repeat. The Seals do it 100 times for their testing, and I made it to only 80 myself.
"EMOM training stands for Every-Minute-On-the-Minute." Taking advantage of high intensity training, and really working that power and explosiveness to try (there is no try actually) to get to a certain number of reps in that minute.
Over and Under
Swimming half of the lap on the surface, and the other half underneath. Making sure your knees do not over bend, and build up your leg strength.
Continuously training under high intensity
The whole point of most of these challenges is to push your body to its limits as fast as possible. The sooner you do that the sooner you'll get stronger, the sooner you get stronger, the sooner you will be combat ready. Or if you are doing this for health and wellness, the sooner you'll get to your goals.
This is the overkill strategy to get stronger from swimming. You don't HAVE to do this, but if you do then it will be far more quick than the traditional ways.
However something these posts and videos I watched to grasp a better understanding, they all come to the same conclusion that I do that your form needs to be top tier. You cannot mess up your strokes, so on an "off" day where you aren't training for strength and/or speed; Then you can focus on doing all of the strokes to practice your form.
What + Psychology:
How does this all play out? Some of the trainings focus on speed, some on strength, and others on both. When you reach those moments of extreme fatigue, that is when you can push to the next level and get stronger. I've gotten that from my dry workouts even.
However most people have to train themselves to feel comfortable with being sore, then be comfortable with pushing to new heights.
When you add the water element to this, it changes dramatically as you can't breath easily. That changes how you think, and how you react. These trainings help push you past those limits, and if you fail you are out of the program.
While this is such a simple post, for a pretty complex system of exercises. I wanted to get the idea out there. Most people probably haven't considered doing a training like this, let alone attempted it.
What I'd suggest first is the sinking technique. Learn to control your descent, and your mind's reactions to no air. That will dramatically improve your swimming, let alone breathing ability, and it will more importantly train your mind.
This is advice for people to level up their swimming, or perhaps get started in the first place. While you swim you should make sure you are doing so in a public facility with a lifeguard on duty for safety.