How does a beaver protect itself?

Beavers build dams to keep predators away from them. They can also protect themselves by scratching or biting other animals.