A dam is a barrier that stops or restricts the flow of water or underground streams. Hydropower is often used in conjunction with dams to generate electricity.