Recent results of the VKS experiment have shown that dynamo action takes place when a swirling flow is generated between two counterrotating disks. When one of the disks rotates faster than the other, the magnetic field displays various dynamical behaviors such as random or periodic reversals, symmetric and asymmetric bursts... I will show that all these behaviors result from the competition between two linearly unstable modes of the magnetic field. Relevance of this mechanism for geo and astrophysical objects will also be presented.