Remote Control Design
Like Olin and Oli already mentioned there are parts which do just that. In my opinion Vishay has the most complete offering, regarding frequency, package and protocol.  

You can build a receiver yourself, but despite their appearance &mdash; a simple three-legger &mdash;  



they contain quite some electronics, which you may find hard to reproduce yourself using discrete components:  




The input stage converts the photodiode's current to a voltage.  
The AGC adapts the sensitivity so that code appears at the right level.  
The bandpass filter suppresses unwanted frequencies, like from fluorescent lamps.  
And the demodulator removes the carrier and recovers the baseband signal.  


It's not impossible to build this yourself, but it's a silly exercise really, given the low price and the reliability of readily available parts.