Holding your breath is pretty much going to guarantee that you are seriously injured or even killed. And that's from as little as four feet on a full breath of from your tank. SCUBA is not like free diving. In your class you will learn about something called Boyle's Law that deals with pressure, volume, and density.
As you descend the reg delivers air at ambient pressure. So at additional depth you are taking in more air (that is also denser) to keep your chest from being collapsed. That air as you then ascend begins to expand. Your lungs will as well. To a point. Then they will tear.
Gas will then either 1. enter your bloodstream causing an arterial gas embolism (think stroke but caused by air bubble instead of blood clot),
2. enter your chest cavity putting undue pressure on your heart (perhaps enough to stop it),
3. enter the chest cavity causing your lung (s) to collapse,
4. or migrate under the skin around your neck turning it into something akin to bubble wrap (this is perhaps the best outcome out of all four of these).
I teach the first rule of SCUBA is to never hold your breath. The second is to equalize and never hold your breath. The third is never hold your breath. The fourth is equalize, never hold your breath, and plan your own dive. The fifth is all of the above and never hold your breath. Six is always look cool (and never hold your breath).
Scuba is an extreme activity with a very real risk of injury or death. Divers have died in Open Water classes.
They have died from what you are asking about doing in the pool. It is fun, exciting, educational, and interesting.
It can be safe if you approach it the right way.
That is through comprehensive training from a competent instructor who will teach you the things to mitigate the risk. But it is by no means 100% safe for everyone.
It will hurt or kill you very quickly in some very nasty ways if you don't give it the respect it deserves. Or exceed your training too far too fast. Or choose quick cut rate training just to get in the water.