To feel safe, protected, and comfortable in and out of the water when you have your period, consider the following options. You may decide to change what you do depending on the heaviness of your flow, how you feel that day, and what is important to you. Some women choose not to swim when they are menstruating. Maybe a discussion with your teacher might open up the path to understanding. Other women find that tampons do the trick.
Tampons are easy and accessible, and take less effort to use with practice.
Of course, they're not foolproof because, sometimes, there's leakage when a woman comes out of the water. To help safeguard against this possibility, a woman can put in a new tampon before she swims and then replace it with a new one right after she finishes swimming. Between changes, to be discreet, she can grab a towel whenever she comes out of the water to help feel more at ease. With these methods, you learn, with experience, to sense when they need to be emptied. Then you remove the barrier, wash it, and re-insert it.