The idea of sticking a thermometer in someone's ear seems pretty weird because we are so used to sticking thermometers in our mouths. It turns out, however, that the eardrum is an extremely accurate point to measure body temperature from because it is recessed inside the head (just like your tongue). The problem with the eardrum is that it is so fragile. You don't want to be touching the eardrum with a thermometer.
This makes the detection of the eardrum's temperature a remote sensing problem. Granted it is not very remote - just a centimeter or so. But remote nonetheless! It turns out the remote sensing of an object's temperature can be done using its infrared radiation. This technique is a very good way to detect the temperature of a person's eardrum.
All of the objects around you are radiating infrared energy right now. Human beings don't have any sensors that can detect subtle differences in infrared, but our skin can detect objects radiating lots of infrared energy. When you warm yourself by standing close to a fire, the "warmth" is infrared energy that you are absorbing. The idea behind the temperature sensor in the ear thermometer is to create a device that is sensitive to very subtle changes in infrared emission. One common sensor is the thermopile, which can be accurate to the tenth of a degree. The thermopile sees the eardrum and measures its infrared emissions. The emission is converted into a temperature and displayed on an LCD.
These two patents are interesting: