Transcranial magnetic stimulation (TMS) combined with electroencephalography (EEG) is a technique for studying cortical excitability and connectivity in health and disease, allowing basic research and potential clinical applications. A major methodological issue, severely limiting the applicability of TMS–EEG, relates to the contamination of EEG signals by artifacts of biologic or non-biologic origin. To solve this problem, several methods, based on independent component analysis (ICA), principal component analysis (PCA), signal space projection (SSP), and other approaches, have been developed over the last decade. This article is divided into two parts. In the first part, we review the theoretical background of the currently available TMS–EEG artifact removal methods. In the second part, we formally introduce the mathematics underpinnings of the cleaning methods. We classify them into spatial and temporal filters based on their properties. Since the most frequently used TMS–EEG cleaning approach are spatial filter methods, we focus on them and introduce beamforming as a unified framework of the most popular spatial filtering techniques. This unifying approach enables the comparative assessment of these methods by highlighting their differences in terms of assumptions, challenges, and applicability for different types of artifacts and data. The different properties and challenges of the methods discussed are illustrated with both simulated and recorded data. This article targets non-mathematical and mathematical audiences. Accordingly, those readers interested in essential background information on these methods can focus on Section 2. Whereas theory-oriented readers may find Section 3 helpful for making informed decisions between existing methods and developing the methodology further.