Randy has explained the when and why, but not the how.
Essentially, with any analog signal a transducer is used to convert a physical measurement into an electirial signal that correlates with the measured phenomenon. This signal is usually then amplified or conditioned to a higher range so that the stronger signal is proportional to the physical measurement and can be transmitted some distance. Inside the PLC this electrical signal is converted to digital data, say for example 0-4095, that is also proportional to the measured physical phenomenon.
For example, a pressure may be measured by a strain guage with an ouput of 20 mV at 100 psig. This is amplified to a signal that is 0 VDC at 0 psig and 10 VDC at 100 psig. This is input to a PLC with a 12 bit analog input, where 0 in the input's data register = 0 psig, and 4095 in the input's data register indicates 100 psig.