Rings and gaps have been observed in a wide range of protoplanetary discs, from young systems like HLTau to older discs like TW Hydra. Recent disc simulations have shown that magnetohydrodynamic (MHD) turbulence (in the ideal or non-ideal regime) can lead to the formation of rings and be an alternative to the embedded planets scenario. In this paper, we investigate how these ring form in this context and seek a generic formation process, taking into account the various dissipative regimes and magnetizations probed by the past simulations. We identify the existence of a linear and secular instability, driven by MHD winds, and giving birth to rings of gas having a width larger than the disc scale height. We show that the linear theory is able to make reliable predictions regarding the growth rates, ring/gap contrast and spacing, by comparing these predictions to a series of 2D (axisymmetric) and 3D MHD numerical simulations. In addition, we demonstrate that these rings can act as dust traps provided that the disc is sufficiently magnetised, with plasma beta lower than $10^4$. Given its robustness, the process identified in this paper could have important implications, not only for protoplanetary discs but also for a wide range of accreting systems threaded by large-scale magnetic fields.