How Magnetic Field Is Produced