An Arbitrary Waveform Generator is used to create analog waveforms from digital data. It is not that much different from the sound chip in your computer. It consists of a memory with a pointer, and a DAC. See the animation below.

Please excuse the crummy sine wave

Here the pointer increments through the memory and the values in the memory go to the DAC. In this example the memory contains 8 data points that represent the amplitudes of a sine wave. Each data point is calculated to be the value of the waveform every 45 degrees, this makes up 8 points (360/8=45).

The waveform was actually created ahead of time by some program, then loaded into the AWG memory. Since any values can be placed in the memory, virtually any waveform can be created. This is where the math comes in.

Most AWG's replace the incrementing pointer with a program counter that is part of a full featured processor, this way jumps, loops and subroutines are all possible, allowing creation of a wide array of waveform types.