They will know how to swim...for sure. We let ours take a dip in some water when they were about 3 days old. We only kept them in there for about 5 minutes and then took them out to dry them off and put them back under the brooder lamp. Our ducks are now about 10 days old.
They can get in the water a few days after hatching. Just make sure the water is warm (about the temp of their brooder), don't let them stay in long and towel dry them when you are done and put them back in the brooder under the lamp so they dry fully.
As they get older, they can do longer swims, but still make sure they are drying completely.
Supervised swim times until they are old enough to be able to get out entirely on their own.