Most of the time IR communication is done using microcontrollers. The sender encodes the info and the reciever decodes it. You can send as many different commands or sequences as needed.
Remotes for TVs and such use a few different standards (encoding methods). Nigel's tutorial covers one of them.