Much of our lives are spent in unconstrained rest states, yet cognitive brain processes are primarily investigated experimentally using task-constrained states. It may be possible to utilize the insights gained from experimental control of task processes as reference points for investigating unconstrained rest. To facilitate comparison of rest and task functional MRI (fMRI) data we focused on activation amplitude patterns, commonly used for task but not rest analyses. During rest, we identified spontaneous changes in temporally extended whole-brain activation pattern states. This revealed a hierarchical organization of rest states. The top consisted of two competing states consistent with previously identified "task-positive" and "task-negative" activation patterns. These states were composed of a variety of more specific states that repeated over time and across individuals. In contrast to the classic view that rest consists of only task-negative states, task-positive states were present over 40% of the time while individuals "rested." This suggests individuals conduct extensive task-oriented mental activity during rest. Consistent with this interpretation, classifier decoding of rest brain states based on thousands of task fMRI studies identified a variety of matched active tasks. Further, an analysis of task data revealed a similar hierarchical structure of brain states. Together these results suggest brain activation dynamics form a general hierarchy across both task and rest, with a small number of dominant general states reflecting basic modes of brain function along with a variety of specific states likely reflecting the rich variety of cognitive states experienced in everyday life.