Powering external device. MOSFET or Relay?

Hoping someone can help out, as I'm sure this is easy.

I have a couple of projects that use externally powered devices; a bubble blower (4x D cells), and a Beacon (12v 1A).
Shown here in Directors Want Tea http://thathollywood.wordpress.com/2013/10/15/make-me-tea-arduino-nfc-activated-beacon/
They're based on these circuits > High-Power Control: Arduino + N-Channel MOSFET http://bildr.org/2012/03/rfp30n06le-arduino/
However, after only a few seconds of operation the MOSFET gets really hot. I mean REALLY hot, and I pull the plug.
The MOSFET is rated IRF520.
I also have the 1A44AA / FQP5N80 and LM317 but the circuit doesn't operate with these (not even sure where they came from). Wrong ratings?

Be kind. Please. I'm a developer struggling to understand electronics.
Thanks in advance.

If they don't need fast switching, a relay works fine.
If they need to be PWM'd or similar, than transistor is the way to go.

You link to a page showing how to use the RFP30N06LE n-channel MOSFET to switch
high currents.

But you use an IRF520 instead.

You can't, its the wrong device and needs 10V gate drive. The RFP30N06LE is
"logic level" and works from 5V and will handle upto 3A without needing a heatsink.

The IRF520 is not logic level and won't handle more than 1.5A without needing a heatsink
anyway.