This review explores the pivotal role of attention in everyday life, emphasizing the significance of studying attention-related brain functions. We delve into the development of methodologies for investigating attention and highlight the crucial role of brain neuroimaging and transcranial magnetic stimulation (TMS) in advancing attention research. Attention optimization theory is introduced to elucidate the neural basis of attention, identifying key brain regions and neural circuits involved in attention processes. The theory further explores neuroplasticity, shedding light on how the brain dynamically adapts and changes to optimize attention. A comprehensive overview of TMS is provided, elucidating the principles and applications of this technique in affecting brain activity through magnetic field stimulation. The application of TMS in attention research is discussed, outlining how it can be employed to regulate attention networks. The clinical applications of TMS are explored in attention-deficit/hyperactivity disorder (ADHD) and depression. TMS emerges as an effective clinical treatment for ADHD, showcasing its potential in addressing attention-related disorders. Additionally, the paper emphasizes the efficacy of TMS technology as a method for regulating depression, further underlining the versatility and therapeutic potential of TMS in clinical settings. In conclusion, this review underscores the interdisciplinary approach to attention research, integrating neuroimaging, neuroplasticity, and TMS. The presented findings contribute to our understanding of attention mechanisms and highlight the promising clinical applications of TMS in addressing attention-related disorders. This synthesis of theoretical and practical insights aims to propel further advancements in attention research and its therapeutic applications.