The thing you should takeaway from this line of thinking is that the Sun's magnetic field is generated by a different mechanism then the one that make permanent magnets at human temperature scales.
–
dmckee♦Sep 12 '12 at 14:41

2 Answers
2

If the sun's internal plasma was at rest (the sun would have to stop rotating and other factors would need to occur), then I believe the magnetic field would dissipate and dissolve, essentially being 'demagnetized'.

However, because the star is rotating, and different layers of it at varying rates, the churning of the plasma (which is charged) generates the magnetic field as it moves past other charged plasma.

A stellar magnetic field is a magnetic field generated by the motion of conductive plasma inside a star. This motion is created through convection, which is a form of energy transport involving the physical movement of material. A localized magnetic field exerts a force on the plasma, effectively increasing the pressure without a comparable gain in density. As a result, the magnetized region rises relative to the remainder of the plasma, until it reaches the star's photosphere. This creates starspots on the surface, and the related phenomenon of coronal loops

Also, a central part you're missing in the relationship to metals on earth is that you're not reaching a plasma state with the metal. Above a certain temperature, a solid metal will reconfigure itself into random alignment (no aligned charges), but if you go too far and make it a plasma, it's essentially all charged nuclei. This just isn't discussed because a majority of people don't tend to make metals into plasmas on a very routine basis.

The solar dynamo is responsible for the magnetic field. It has nothing to do with a magnet and thus is not affected by hight temperature. The sun is made of plasma which flows at the velocity V. This flow creates an electric field E=VxB, this electric field runs a current j through Ohm's law which in turn creates a magnetic field. The interaction between the current and the magnetic field creates a net force jxB that runs the plasma velocity V leading to a self sustained magnetic field.