I'm learning about magnetism in my physics course, and we talked about Hans Christian Oersted's experiment where he observed electric current passing through a wire and analyzed the movement of a compass around this wire. He discovered that a magnetic field is generated by this current passing through the wire. But i'm confused about how exactly this magnetic field is generated though, we're told to just accept it. But it really irritates me. What exactly causes it? Why does moving charge create this field? Why does charge have to move through a solenoid or a wire to create this field? Is it important towards my understanding of magnetism?