Transcranial magnetic stimulation is a noninvasive procedure used to treat depression by stimulating the brain using electromagnetic pulses.