The Sun has a permanent North and South rotational pole, through which the Sun rotates once every month or so. In addition, just like the Earth, it has a North and South magnetic Pole, however, every 11 years, these poles switch their locations relative to the poles defined by the Sun's spin axis.
The Earth does the same thing every 250,000 years, believe it or not! The evidence is in the fossilized traces of magnetic particles in the Atlantic Spreading Zone. Like tiny magnets, their orientations with respect to the Earth's North and SOuth pole can be dated and measured.
The rule of thumb seems to be that ANY body that spins and has internal conducting fluids, has a magnetic field that flips from N to S and back again. The time this takes depends on the conductivity of the conducting fluid, the scale of the spinning system and its rate of spin.