XSS J12270-4859 (henceforth J12270) is the first low-mass X-ray binary to exhibit a transition, taking place at the end of 2012, from an X-ray active state to a radio pulsar state. The X-ray emission based on archival XMM-Newton observations is highly variable, showing rapid variations (10 s) from a high X-ray luminosity mode to a low mode and back. A flaring mode has also been observed. X-ray pulsations have been detected during the high mode only. In this work we present two possible interpretations for the rapid swings between the high and low modes. In the first scenario, this phenomenon can be explained by a rapid oscillation between a propeller state and a radio-ejection pulsar state, during which the pulsar wind prevents matter from falling onto the neutron star surface. In the second scenario, a radio pulsar is always active, the intra-binary shock is located just outside the light cylinder in the high mode, while it expands during the low mode. At variance with other transitional pulsars, J12270 shows two instances of the low mode: a low-soft and low-hard mode. Performing an X-ray spectral analysis, we show that the harder component, present in the low-hard spectra, is probably related to the tail of the flare emission. This supports the understanding that the flare mechanism is independent of the high-to-low mode transitions.