Why is the magnetic field created? From Oersted experiment we know " When an electric current is passed through a conducting wire, a magnetic field is produced around it." An electric current is a flow of electric charge or electron. My question is "How does a flow of electron or electric charge create magnetic field?"
 A: I would suggest watching this by Veritasium.
Suppose you are the charge and moving along a current carrying wire at a distance d from it.
Now the electrons in the wire relative to you are going backwards and since einstein proposed his laws, the electrons get a little squished relative to you.
So you will see that the electrons are crowded together and the wire is now not neutral relative to you, you will observe a electrostatic force. In the ground frame we call it magnetic force.
A: The short answer is because a moving charge induces a magnetic field. 
The longer answer has to include what we observe and what we we have to deduce. Oersted has observed that a moving in circles electron  (the current in the coil) led to a magnetic field. How that happens in detail:
Moving in circles a body experience an acceleration. Why it is important to mention this fact? Because under this acceleration the electrons spins get aligned. And the intrinsic magnetic dipole moment of the electron gets aligned together with its spin! So the magnetic field of the coil is the sum of the magnetic dipole moments of the involved electrons.
