Compared to the picture of the analog signal above, there is a major difference in this wave form. The transition from the peak of the wave to the bottom of the wave is *discrete*. In this case, the only way to represent data is by using the high or low point of the wave. For example, the high point may represent a "on" signal and the low point may represent a "off" signal. In the world of computers, this is also known as a binary numbering system consisting of only two digits. By using a digital signaling system in this fashion, it makes encoding and decoding data very simple. Generally, it will be very easy to determine where the peaks and valleys are, even with some signal loss or disturbance.
Digital methods are used as long as frequency response (bandwidth) is not a limitation. Analog methods are used only because multiple signal levels must be exploited to communicate a higher data rate of digital values in lieu of having adequate bandwidth.
A digital signaling system often has an analog component. Strictly speaking, this means the a digital wave isn't as sharp cornered as the picture shows above. The corners will likely be slightly rounded and even more so as the signal travels over some distance. For our purposes, this definition should give you a basic idea of how a digitally encoded system works.
Modulation is a prescribed method of encoding digital (or analog) signals onto a waveform (the carrier signal). Once encoded, the original signal may be recovered by an inverse process called demodulation. Modulation is performed to adapt the signal to a different frequency range than that of the original signal. Here's how it flows:
bits -> modulator -> audio -> phone network -> audio -> demodulator -> bits
Hence the name MODEM short for modulator/demodulator. The modem is necessary because the phone network transmits audio, not data bits. The modem is for compatibility with existing equipment.