We study magnetic solitons, solitary waves of spin polarization (i.e., magnetization), in binary Bose-Einstein condensates in the presence of Rabi coupling. We show that the system exhibits two types of magnetic solitons, called $2pi$ and $0pi$ solitons, characterized by a different behavior of the relative phase between the two spin components. $2pi$ solitons exhibit a $2pi$ jump of the relative phase, independent of their velocity, the static domain wall explored by Son and Stephanov being an example of such $2pi$ solitons with vanishing velocity and magnetization. $0pi$ solitons instead do not exhibit any asymptotic jump in the relative phase. Systematic results are provided for both types of solitons in uniform matter. Numerical calculations in the presence of a one-dimensional harmonic trap reveal that a $2pi$ soliton evolves in time into a $0pi$ soliton, and vice versa, oscillating around the center of the trap. Results for the effective mass, the Landau critical velocity, and the role of the transverse confinement are also discussed.