Theory:

Digital Thermometer:
Clinical thermometers have the practical difficulty of disposing of the mercury while it is breaking down. Mercury is a toxic substance, so it is needed to be disposed of properly and safely. To overcome this situation, nowadays, Digital thermometers are used to measure body temperature in clinics.
 
800px-Thermometer_(Digital).png
Fig. - Digital Thermometer
 
Working:
Digital thermometers work on the principle that the electrical resistance of the material changes with temperature. Digital thermometers are different to conventional thermometers, such as liquid-filled and bimetallic thermometers in that they need a sensor. These sensors produce a resistance, current or voltage in reaction to a change in temperature. These changes are referred to as analogue output signals, and it is converted to digital to make it easy to visible.
Infrared thermometer:
Infrared thermometers are typically used to measure the temperatures that are necessary to be measured from a distance. They give accurate temperatures without ever having to touch the objects that you are measuring (even when your object is in motion).
 
1024_Pyrometer-8445.jpg
Fig. - Infrared Thermometer
 
Reference:
Image credit:
https://commons.wikimedia.org/wiki/File:Thermometer_(Digital).png
https://upload.wikimedia.org/wikipedia/commons/2/2a/1024_Pyrometer-8445.jpg