Your brainwaves normally vary from a low vibrational state of about one Hz ('Hertz,' or vibrations per second) to a high of about 30 Hz. The highest-frequency vibrations, ranging from about 13 to 30 Hz, are called beta waves. When your brain is in a beta state, it's in a high state of alertness. Alpha waves are somewhat slower, from 8 to 13 Hz. If your brain moves into the alpha range, you're still awake and alert, but more relaxed. As your brain moves into the theta range, from about 4 to 7 Hz, you're entering the realm of sleep. It's in the theta range that you dream. Delta waves are the slowest, from about 0.5 to 4 Hz. That's the realm of deep sleep, which your brain needs to replenish itself for the activity of another day. Even in its low-frequency delta state, your brain is still active. What's it doing?
One recent theory about delta sleep is that it's a period when your brain is carrying on a quiet internal dialog, during which the hippocampus (a brain structure crucially involved in learning and memory) sorts through the day's flotsam and jetsam of experiences, selecting out the important lessons from the day and relaying them to the cortex. Then, when your brain moves into the theta state of REM sleep, it practices and rehearses its newly-learned lessons in dreams.