On a Windows machine with Firefox and Azureus installed magnet links in web pages are already associated with Azureus. In Linux (at least in my experience with Gentoo) this association is missing by default.
The following steps will enable the desired functionality.
Type about:config into the address bar and press Enter.
Right-click -> New -> Boolean -> Name: network.protocol-handler.external.magnet -> Value -> true
Right-click -> New -> String -> Name: network.protocol-handler.app.foo -> Value -> /usr/bin/azureus
Ensure network.protocol-handler.expose-all is set to true
This information was taken from mozillaZine.org