dam / damn are similar-sounding terms with different meanings (referred to as homophones). To better understand the differences, see below for definitions, pronunciation guides, and example sentences using each term. 👇
dam: (noun) a barrier constructed to contain the flow of water or to keep out the sea. (noun) female parent of an animal especially domestic livestock. (verb) obstruct with, or as if with, a dam.
damn: (noun) something of little value. (adjective) used as expletives.
dam: d·AE·m
damn: d·AE·m
(Examples are Wikipedia snippets under the CC ShareAlike 3.0 license. Definitions drawn from WordNet.)