Defense mechanism of Fungi

Explain how do fungi defend themselves or compete against other fungi, bacteria and other organisms?