One of the things to train (as mentioned) is the ability to hold your breath while performing physical activity.
When I was a kid, one of the fun games we played that trained this was for everyone to stand in about 4' of water with feet wide apart, in a staggered line.
The idea was to see who could stay underwater the longest while swimming between everyone's legs (like a skiier through a slalom).
The other thing we tried was to see how many laps we could swim underwater, the breadth of an Olympic sized pool. Back then, I managed 3 widths of the pool underwater. I also managed to hold my breath underwater for 5:54. I was working on breaking the 6 minute mark when I read about some dumbass breaking 7:30 (back in the late '80's) and I thought, "Well, f### it".
One of the training techniques that can be done without water is simply any physical activity while holding your breath.
A common one was to see how many situps you can do on one breath (works best if you can do at least 100 situps in a row).
You can also try holding your breath for duration on a treadmill or exercise bike.