During iFixit's teardown of the iPhone 4S, the site came across a component that it couldn't immediately identify. After subsequent testing, iFixit has determined that the iPhone 4S has an infrared LED that acts as a secondary proximity sensor, and its functions appear to be tied directly to Siri.
All earlier models of iPhones have had a proximity sensor designed to shut the handset's touchscreen off when you raise it to your ear. This is designed to prevent your face from dialing numbers while you're on a phone call. The sensor is normally only active during phone calls or when using a VoIP app like Skype.
In contrast, this new infrared LED is constantly active if you have enabled "Raise to Speak" in Siri's settings. The whole purpose of the sensor is essentially the same as the iPhone's traditional proximity sensor, just with a different function; instead of deactivating something, this sensor instead activates Siri when you raise it to your ear.
Although the LED is constantly active if you have "Raise to Speak" enabled, it's most likely drawing a minuscule amount of power and thus not the cause of widely-reported battery issues in the iPhone 4S (which a forthcoming iOS 5 update hopes to address). It's also worth noting, as iFixit rather humorously does, that although the iPhone 4S will constantly be emitting an infrared beam in your direction as you use it, the beam is completely harmless.