Swimwear fabric should be composed of 100% man-made fibers. Natural fibers such as cotton will absorb water, making it an impractical choice. Look for fabrics that are mostly composed of nylon (from 80% to 90%) but also have a significant amount of Lycra or spandex (10% to 20%).
Male Swimsuit example
Female Swimsuit example