check out the examples on
and that will get you going. I used that to write a sketch that activates a relay after detecting the on/off IR code for my stereo. I plan to use this to activate the fan to cool the unit that is in a drawer. The point is you have lots of good examples on that site to help you. It is pretty simple. Relays just need 5V on the solenoid coil to move the pole from normally closed side to the normally open side. To do this just put the voltage on a digital pin of the Arduino and set the pin to high using digitalWrite(pin, HIGH) where pin is the integer number of the pin where you have the relay 5V input connected.
The only hard part is figuring out which terminal is which but it will be obvious if you test it with a multimeter first. All this and more is explained on Adafruit.com