Tampon help?

Okay so I’m 19 lol, but I never really used tampons like that. I only use pads and miss out on swimming events, but this time we’re going to the beach and I don’t want to miss it! I’ve worn tampons before at the end of my period and it’s been fine. Although, the last two times I’ve used them they leaked through! At the time though, my period was heavy and the tampon was pretty little. Could it be that I wasn’t wearing the right size? My question is, how do you know when a tampon is inserted correctly?