Always rinse your swimwear after use, in cold water.
(Handwashing is also way better for the environment).
Make sure that all sand is removed from garment as this can dry out the fabric.
Lay flat out of direct sunlight to dry.
Avoid rough surfaces: concrete, wooden and other uneven surfaces can snag the fabric and cause it to pill.
Do not iron over any patterns or leave in sun.
Store in a dry place.