Many complex and interesting phenomena in nature are due to nonlinear phenomena. The theory of nonlinear dynamical systems, also called 'chaos theory', has now progressed to a stage, where it becomes possible to study self-organization and pattern formation in the complex neuronal networks of the brain. One approach to nonlinear time series analysis consists of reconstructing, from time series of EEG or MEG, an attractor of the underlying dynamical system, and characterizing it in terms of its dimension (an estimate of the degrees of freedom of the system), or its Lyapunov exponents and entropy (reflecting unpredictability of the dynamics due to the sensitive dependence on initial conditions). More recently developed nonlinear measures characterize other features of local brain dynamics (forecasting, time asymmetry, determinism) or the nonlinear synchronization between recordings from different brain regions. Nonlinear time series has been applied to EEG and MEG of healthy subjects during no-task resting states, perceptual processing, performance of cognitive tasks and different sleep stages. Many pathologic states have been examined as well, ranging from toxic states, seizures, and psychiatric disorders to Alzheimer's, Parkinson's and Cre1utzfeldt-Jakob's disease. Interpretation of these results in terms of 'functional sources' and 'functional networks' allows the identification of three basic patterns of brain dynamics: (i) normal, ongoing dynamics during a no-task, resting state in healthy subjects; this state is characterized by a high dimensional complexity and a relatively low and fluctuating level of synchronization of the neuronal networks; (ii) hypersynchronous, highly nonlinear dynamics of epileptic seizures; (iii) dynamics of degenerative encephalopathies with an abnormally low level of between area synchronization. Only intermediate levels of rapidly fluctuating synchronization, possibly due to critical dynamics near a phase transition, are associated with normal information processing, whereas both hyper-as well as hyposynchronous states result in impaired information processing and disturbed consciousness.