Warning: fiddling with your home’s electrical supply is not something to be taken lightly. A 9V battery may tingle your tongue, but 120-240V can fry it and potentially kill you. If you die from this, I take absolutely zero responsibility. If you don’t accept this, stop reading now.
Solid State Relays
Relays are electrically controlled mechanical switches; apply voltage to the trigger side and the magnet inside will flip the switch mechanically.
They come in different sizes and ratings, so it’s absolutely essential to check the total current and voltage you intend to switch; if you try to apply 240VAC through a relay rated for only 5VDC, then bad things will happen .
The characteristics of the relays also mean that you can’t just connect them directly to the Arduino — you need to isolate them somewhat with a transistor and provide a «flyback» diode. Relays contain magnets that are inductive so they hold a charge of electricity. When you suddenly drop a charge, the inductive load goes back into the circuit it came from, in reverse polarity; a flyback diode protects the circuit.
Relays can be wired as normally open meaning «off unless you turn them on»; or normally closed meaning «on unless you turn them off».
If this is the route you want to take, be aware that this is the most dangerous as there will be exposed wires. You can purchase a relay kit from SparkFun for $20; it includes a small circuit board and all the necessary additional components to switch up to 240 V AC .