Ultrafast spintronics is one of the most promising fields for information processing technology innovation. When compared with traditional electronic devices, new spin-based devices have advantages such as low power consumption, high speed, and nonvolatility. Exploring novel physical phenomena and mechanisms relating to electronic spins significantly promotes the development of next-generation spintronic devices. In this review, we outline a sequence of advances in the fields of ultrafast magnetics and spintronics. First, a quick overview of spintronics and the discovery of ultrafast demagnetization induced by a femtosecond laser is provided. The proposed physical mechanisms and theories of ultrafast spin dynamics are then summarized, including the phenomenological three-temperature model, computations based on the time-dependent density functional theory, the Elliott-Yafet spin-flip mechanism, and the nonlocal superdiffusive spin transport model. Following that, the most recent experimental and theoretical studies on all-optical switching of ferrimagnetic and ferromagnetic metals are thoroughly reviewed. Furthermore, the discovery of hot-electron spin transport induced by ultrashort lasers as well as its influence on ultrafast magnetization dynamics, ultrafast spin transfer torque, spin injection into semiconductors, and spin accumulation and dissipation in hot-electron transport are described. The advancements in the optimization and manipulation of spintronics-based terahertz emitters are reviewed and analyzed. Finally, we discuss the current challenges in ultrafast spintronics research as well as possible future studies.