Transcranial magnetic stimulation (TMS) activates and deactivates regions of the brain with a magnetic pulse, temporarily mimicking brain damage.