Beavers build dams and lodges using tree branches, vegetation, rocks and mud; they chew down trees for building material. Dams restrict water flow, and lodges serve as shelters. Their infrastructure creates wetlands used by many other species, and because of their effect on other organisms in the ecosystem, beavers are considered a keystone species.
How do beaver damns benefit the environment?
Although beavers build damns to protect themselves they also help generate wetlands which are natural habits for a lot of other species.  They are a key contributor to the ecosystem they live in.