The Duck and Mallard Duck are critters. They can usually only spawn in the middle third of the above-ground world, or in areas near an NPC's house if water is present. They only appear in pools of water, regardless of their size or if they are naturally generated. They quite frequently make a "quack" sound when nearby.
Ducks will passively wander the surface until they fall a certain distance or are submerged, at which point they will switch to their alternate flying form, where they will fly in a given direction for a certain amount of time before landing and switching back to their passive form. Despite their spawn conditions, they do not prioritize water whenever landing.
Ducks have only 5 health and no defense, and can be damaged by other enemies and players.
Ducks can be caught with any Bug Net to be carried around in the inventory and released later, or crafted into animated decorative furniture (Duck / Mallard Duck Cage). Once crafted, the Ducks cannot be released again, unless the furniture item is de-crafted via Shimmer(Desktop, Console and Mobile versions).
Ducks can be spawned by the Duck Statue, however statue-spawned critters cannot be caught with any Bug Net, and will disappear in a puff of smoke when the player attempts to do so.
Heavy Work Bench(Desktop, Console, Old-gen console and Mobile versions)andEcto Mist(Desktop, Console and Mobile versions)
Trivia
Much like how Owls(Desktop, Console and Mobile versions) have a human voice say "hoot" as a rare Easter egg, Ducks have a 1/300 (0.33%) chance to make a human "quack" sound instead of their normal sound.[1] It was pulled from a royalty-free site because the Re-Logic team found it amusing.Verify
Ducks, Mallard Ducks, and Bunnies are the only critters that only spawn in the middle-third of the above-ground world.
Ducks are one of six critters that do not have a gold variant.
↑Information taken from the Desktop1.4.4.9 source code, methods UpdateNPC_CritterSounds() in Terraria.NPC.cs and PlaySound() in Terraria.Audio.LegacySoundPlayer.cs. The type value of the sound in question is 30.