FM encodes information by varying the frequency of a carrier wave while keeping the amplitude constant, while AM varies the amplitude of the carrier wave to encode information but keeps the frequency constant. Both AM and FM are forms of radio broadcasting that transmit information via electromagnetic waves, with FM using changes in frequency and AM using changes in amplitude to convey the encoded information.