Magnetic flux leakage (MFL) testing is a widely used nondestructive testing (NDT) method for the inspection of ferromagnetic materials. This review paper presents the basic principles of MFL testing and summarizes the recent advances in MFL. An analytical expression for the leakage magnetic field based on the 3D magnetic dipole model is provided. Based on the model, the effects of defect size, defect orientation, and liftoff distance have been analyzed. Other influencing factors, such as magnetization strength, testing speed, surface roughness, and stress, have also been introduced. As the most important steps of MFL, the excitation method (a permanent magnet, DC, AC, pulsed) and sensing methods (Hall element, GMR, TMR, etc.), have been introduced in detail. Finally, the algorithms for the quantification of defects and the applications of MFL have been introduced.