The noun dam refers to a structure used to hold back water. The word also works as a verb; to dam is (1) to hold back by means of a dam, or (2) to close up or obstruct. To damn is (1) to condemn, (2) to bring about the failure of, (3) to prove guilty, or (4) to send to everlasting punishment.
Using dam is easy because it almost always has to do with barriers built across waterways. Damn is a little trickier because it has many definitions and in some uses is widely considered a curse word.
Damn is perfectly acceptable in all contexts when it means to condemn, to prove guilty, or to bring failure. As a curse word, damn is considered less offensive than some others. It’s often used where the participial adjective damned would make more sense—for example, because damn is a verb and not an adjective, it is grammatically questionable in the phrase the rent is too damn high. But because the use of damn in place of damned in phrases is common in colloquial use, condemning it would be pointless.
Officials fear the damaged structure could dam up the creek or cause additional damage to the creek bank and roadway. [Paducah Sun]
Anglers are again descending in droves on the dammed section of the Rio Grande. [Associated Press]
As beavers construct their habitat by damming small bodies of water and building lodges out of dead timber, the rising water levels are a problem. [Boston Globe (dead link)]
If the study backs any of the fool’s errands previously suggested, particularly a bike-pedestrian bridge, that could damn the effort to secure federal funding. [Seacoast Online]
Damned if she did and damned if she didn’t, she opted against candour. [Sydney Morning Herald]
The extent to which a handful of elite schools dominate access to Oxbridge is laid bare in damning figures published for the first time today. [Telegraph]