Alternatively referred to as an infrared thermometer, a temperature gun is a device that measures the temperature of whatever the gun is pointed. For example, with a computer you could point a temperature gun at the CPU heat sink, memory, hard drive, or anywhere in the computer to determine a components temperature. Today, most temperature guns have a laser indicator that shows exactly where the temperature is being taken. The picture shows a temperature gun pointing at the CPU heat sink (indicated by the red laser light) and shows a temperature of 80.0° and max temperature of 80.7°.
Because many of the devices in your computer that generate heat have a heat sink, using a temperature gun only gives you a rough estimate with the heat sink dissipating some heat.