Infrared is a line-of-sight wireless technology that uses a beam of invisible light to transmit information. This means that the infrared ports of both devices must be nearby and aimed at each other for a connection to succeed.
Infrared is the same technology used in most remote controls for home A/V gear such as TVs. Some smartphones are capable of controlling home A/V gear via infrared. Software that mimics a universal remote control is required, which may be included, or may need to be purchased from a third party and downloaded to the phone.
In early smartphones, from 2001 to 2007, infrared was also used for two-way exchange of data between phones, or between phones and computers. The main standard for this was IrDA.
This functionality was then replaced by Bluetooth, which uses radio waves instead of light. Bluetooth is faster, more reliable, and more versatile than IrDA.