Not all dogs can (or will) swim.
It's nice to think your dog can just jump in the water and automatically know what to do. While some dogs (especially breeds like Labradors and Goldens) may instinctively know how to swim, many others do not. Some dogs can't swim and need to be taught. Don't assume your dog knows how to swim, no matter the breed. Others dogs hate or fear the water and refuse to try. Never force a dog into the water. You can try getting in the water and coaxing your dog with toys. If he's not interested, don't push it.
When introducing your dog to water for the first time, take it slowly. Begin with a gentle, shallow body of water where your dog can wade. Work your way up to pools and lakes, as your dog adjusts. Make sure to supervise your dog at all times. When in the pool, make sure he knows where the exit steps.
Get a doggie life jacket.
Watch what your dog drinks.
Most dogs will gladly lap up the water they are swimming in. This can be a problem depending on the type of water. Pool chemicals, obviously, are not healthy to consume. Ocean water can cause vomiting and diarrhea. The salt content in sea water can also lead to serious dehydration. Lake, river, pond and stream water may seem harmless, but can actually contain parasites like Giardia or other nasty "bugs." Parasites and bacteria are more likely to be found in standing water than flowing water, so pay attention to this.
Most dogs are going to try and drink some of the water. They will also likely ingest some by accident. Small amounts are not usually a problem. Keep plenty of fresh, clean water available and encourage your dog to drink that. Always watch your dog for signs of illness, especially after swimming. If you have any concerns, contact your vet and let them know where your dog was swimming.
Yes, dogs can get sunburns too. Those with lighter hair, short hair or pink noses are at a greater risk, but all dogs are susceptible (long-haired dogs can get sunburned noses). As you likely know, water reflects light, so a sunburn is more likely around the water. Make sure your dog has plenty of shade available while swimming.
Chances are, your dog will be off-leash during the swim outing. This is why it's essential to have a strong recall. You should be able to call your dog back to you for any reason. Your dog should also know to stay close to you or check-in with your periodically. If your dog seems headed towards trouble, you should be able to rely on the fact that he will come when called. That's where the emergency recall really comes in handy. Before heading to an open area for swimming, make sure your dog has this foundation of training. Alternatively, keep your dog on a long leash the whole time.