Human brain dynamics can be viewed through the lens of statistical mechanics, where neurophysiological activity evolves around and between local attractors representing mental states. Many physically-inspired models of these dynamics define brain states based on instantaneous measurements of regional activity. Yet, recent work in network neuroscience has provided evidence that the brain might also be well-characterized by time-varying states composed of locally coherent activity or functional modules. We study this network-based notion of brain state to understand how functional modules dynamically interact with one another to perform cognitive functions. We estimate the functional relationships between regions of interest (ROIs) by fitting a pair-wise maximum entropy model to each ROI's pattern of allegiance to functional modules. This process uses an information theoretic notion of energy (as opposed to a metabolic one) to produce an energy landscape in which local minima represent attractor states characterized by specific patterns of modular structure. The clustering of local minima highlights three classes of ROIs with similar patterns of allegiance to community states. Visual, attention, sensorimotor, and subcortical ROIs are well-characterized by a single functional community. The remaining ROIs affiliate with a putative executive control community or a putative default mode and salience community. We simulate the brain's dynamic transitions between these community states using a random walk process. We observe that simulated transition probabilities between basins are statistically consistent with empirically observed transitions in resting state fMRI data. These results offer a view of the brain as a dynamical system that transitions between basins of attraction characterized by coherent activity in groups of brain regions, and that the strength of these attractors depends on the ongoing cognitive computations.