There are countless devices which offer isolation between the PICAXE and mains.
The "safely" part is down to you and how you make the connections.
You can use relays, zero-crossing solid state switches and/or opto isolators.
The datasheet for the device will tell you the level of isolation. Typically, it will be several thousand volts which is enough for most events except lightning strikes.
Where it becomes "dangerous" is in how you hook it all up.
For example, I often use those little 1A optically isolated zero-crossing solid state relays that come in a 14pin DIP package.
That means I have the PICAXE and mains on the same PCB.
I usually build my circuits on strip board.
Forget to cut a track, accidentally make a solder bridge and the two are connected together!!!
It's never happened and is never likely to (famous last words) because I have design rules which include double track isolation whith strip board. That makes it impossible for solder bridges and easy to check visually. Always test thouroughly before applying power. Good layout also helps. In the UK, legislation stipulates that mains tracks must be seperated on a PCB by a minimum of 4mm.
For the less experienced, (a novice should not play with mains) I would suggest the use of a socket mounted realy. The socket will have screw terminals. Coil one side, mains contacts the other side. Very easy to keep a large safety margin between high and low voltage sections. Again, legislation determines that the cables shall be fitted with terminal crimps that cannot be removed without complete removal of the securing screw. ie, impossible to "accidentally fall off" and touch something it shouldn't.