in general the remote control is composed of an incoder and infrared led
and the receiver eg.TV will be composed of a infrared phototransistor and a decoder.
the encoder is composed of two parts: address and data. Depending on the data a signal will be transmitted.
the decoder is also composed of data and address. The decoder should have the same address to read the signal. According to the data transmitted you can make any the tv perform any specific function.