It turns out 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 it's remote nonetheless! It turns out that 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 a 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 links will help you learn more: