TMS operates on the principle of electromagnetic induction. A coil, placed on the scalp, generates a rapidly changing magnetic field, which induces an electric current in the underlying brain tissue. This current can either activate or inhibit neuronal activity depending on the parameters used, such as frequency and intensity. The effects of TMS are localized, allowing for targeted stimulation of specific brain regions.