Digital versus analog signals
When working with electronics signals, you will constantly see references to digital and analog signals, and it is important that you differentiate between the two and know how to make Arduino deal with every type of signal.
A digital signal is one that takes only two clearly different states—no more, no less. To give you an example, switching a light on and off can be a typical case of a digital signal. You just have these two states, and it is on or it is off; it can't be both at the same time and nor can it have any other possible state in between.
In opposition to digital signals, analog ones are those that have a theoretically infinite number of possible values between a minimum and maximum one. Looking for an example relative to light, such as the one given for digital signals, we can think of the light coming from the sun through a window. It has a minimum, when there is no sun in the night, and a maximum, when the sun is just in front of...