Deciding what lens to use is fairly easy. Start with what lens do you have? If you have more than one lens, then you need to understand a few things about lenses in general, then pick from what's available to get what you want from the shot. There are lots of numbers and letters associated with camera lenses: mm, f, 1.4, 22, AF, IS, VR… Knowing what all these mean will help you decide what lens to use or buy.
As with any sport, shooting a swim meet can be a lot of fun. But there are a few things you should keep in mind before you start out to the pool. Beyond camera settings, you need to understand the sport if you want to know what to look for. And you need to understand the venue—the pool—if you want to know where to look for it.