For high-speed maglev, repulsive magnetic forces are used to achieve this (Figure 8). In the TransRapid, there are two electromagnetic rails placed on the train facing either side of the guideway. These rails keep the train from moving too far off course (Lee, 2006).
How do maglev trains not derail?
Similarly, traditional train derailments that occur because of cornering too quickly can't happen with Maglev. The further a Maglev train gets from its normal position between the guideway walls, the stronger the magnetic force pushing it back into place becomes.