Pulse amplitude modulation (PAM) encodes information by varying the amplitude of pulses. There are two types: flat top PAM keeps pulse amplitudes flat, while natural PAM allows amplitudes to vary throughout each pulse. PAM works by sampling the input signal at regular intervals and making each pulse amplitude proportional to the input amplitude when sampled. The sampling frequency must be at least twice the highest input frequency to avoid aliasing. PAM can be generated using a modulating signal, carrier pulses, and a modulator circuit. It is demodulated using a low-pass filter and amplifier.