Transcranial magnetic stimulation (TMS), a relatively noninvasive probe of cortical function, permits new kinds of explorations of relationships between regional brain activity and symptomatology in obsessive-compulsive disorder (OCD). In TMS, a pulsed magnetic field affects activity in cerebral cortex underlying an electromagnetic coil placed on the scalp. Results of exploratory studies suggest that the single- or paired-pulse TMS techniques, and the newer repetitive method (rTMS), in which trains of stimuli are delivered at a given frequency, are potentially useful probes of cortical mechanisms involved in psychopathologic conditions, as in studies of motor, sensory, and cognitive physiology. For example, single-pulse TMS of motor cortex can produce muscle potentials or movement. Higher-frequency repetitive stimulation (rTMS) of occipital cortex can produce phosphenes or visual extinction, stimulation of Broca's area results in word-finding difficulties or speech arrest, and rTMS of prefrontal cortex affects verbal recall and other cognitive functions. Prefrontal rTMS can alter mood in healthy individuals. Both open and controlled clinical studies suggest that single-pulse TMS, and rTMS, may have antidepressant effects. Although the cerebral cortex is the only human brain structure subject to direct magnetic stimulation with current technology, TMS may influence activity in subcortical sites via their functional relationships with cortical areas. The effects of TMS on cortical excitability may depend on a combination of factors including coil design, stimulus frequency and intensity, and possibly the functional state of the cortex before stimulation.