Computers are digital machines and are very good at working with Boolean and number systems but many things in the real world are analog or have an infinite number of states in a range. For computers to use these continually varying states they must convert the value to a finite numeric value. This is generally done with a Analog to Digital Converter (ADC). The ADC works like a voltmeter it compares the connected voltage, to the Ground and a reference voltage and converts it to a number representing the input voltage compared to ground and reference voltage. The range of numbers returned represents the resolution of the conversion, a small range o to 256 is a 8 bit or low resolution, most audio uses a 32 resolution, some medical equipment uses 64 bit or higher. The Arduino uses 10 bit resolution or numbers between 0 and 1023. The Arduino has six inputs that can be used as analog inputs, they are labeled A0 through A5.
The voltage providing the input can come from any source as long as it has a common ground with the Arduino This allows a large number of devices or circuits to be used as analog inputs. A microphone for example generates a small voltage that can provide the input, One of the most common inputs is the voltage divider circuit where one of the resistances is a resistive sensor. like a photo resistor that varies in resistance with light.