We know that two current carrying conductors experiences a force of attraction or repulsion between them depending on the direction of flow of current in it. This we know is because of the interaction of the magnetic fields between them which we call magnetic force. Now we imagine the same situation with two electrons only, both are moving in the same direction with same speed. So, will the electrons attract each other as conductors do? The answer is no because they are stationary with respect to each other and stationary charges do not produce magnetic fields. But the electrostatic forces will still dominate. So now a question arises, “Is there a magnetic force in this case?” Also when a pair of electrons do not experience magnetic force while moving at the same velocity, why would sea of electrons in a pair of conducting wires do? To answer these questions we must first ask ourselves “What is magnetic field? When and how does it come into being?” In case of electric fields we can say, they come into being because of the presence of charge which is a property. But for magnetic field we do not have such fundamental property. They exist when charged particles move.
To explain magnetic force let us imagine a conductor, it has billions of atoms which are made of protons, neutrons and electrons. Protons are positively charged and along with neutrons they form the nucleus. Electrons are negatively charged light particles which stay outside the nucleus. When an electric field is applied to the conductor, the positive charges or protons do not move due to their bulkier size of the nucleus while the electrons flow in the opposite direction of the field applied. Before going any further let us now discuss a small topic of relativity i.e. length contraction. In a brief, it tells us that when an object move relative to another object, the length of the first object in the direction of velocity decreases for the second object. In a way the length of a stationary object is more than the length while it moves, for a particular frame of reference.
So how does it help in case of magnetic fields? Let us for a moment forget about magnetic fields and take only electric fields into consideration. A conductor has both positive and negative charges in equal densities making the conductor neutral. Now, let us imagine an electron outside the conductor moving with same velocity, the electrons inside the conductor are moving. For the proton frame of reference (i.e. our) the electrons inside and outside are moving in the same direction with the same speed. But for the outer (or inner) electron frame of reference, the electrons are stationary while protons (nucleus) are the ones that are moving. Now this is where the length contraction fits in. So now for the external electron as conductor electrons are stationary the linear inter electron space is more than that when the electrons are stationary in our frame of reference. Also similarly for the electron frame of reference the linear inter nuclear space is lesser to that in our frame of reference. This in turn for the exterior electron creates a linear density difference between the protons and the elections. For the electron, the proton distribution appear more linearly dense while the electron distribution appear more linearly sparse. But this velocity of the electrons are much smaller than compared to velocity of light to create any relativistic effect. But the presence of billions of protons and electrons inside the conductor makes this phenomenon quite significant. So now due to the linear charge density difference, the electron experience an electrostatic pull. This is why two current carrying conductors experience a force between them.
But this is what magnetic field does. So now we can say that magnetic field is nothing but electric field in another frame of reference.