Infrared is similar to bluetooth, you can send all of kind of files through it except for those that are copy right protected.
To send data to another phone via Infrared the other phone also needs to have infrared.
1) Turn it on on both of the phones
2) go to the song or pic or vid you want to send
3) go to options and then choose the send via infrared option
4) make sure that the infrared ports on the both of the phones are infront of each other and also make sure that there isn't any obstructions.