Reading on the Internet i learned that PAM is basically a sampling technique which converts an analog signal into a discrete signal. It modulates a train of pulses by varying the amplitudes of the individual pulses in a regularly timed sequence based on the analog wave. (Multiplying the analog signal with a train of pulses)
In my mind i have the idea of PAM being similar to AM but instead of an analog carrier we have a train of pulses.
On the other hand in some textbook i read that the way PAM works is by grouping bits from a stream into symbols and each symbol corresponds to a pulse with a certain amplitude.
This seems to me as a completely different process than the first definition. So what is true? and if both are true when is the second way to do PAM used?