What's the underlying mathematics?
You haven't quite told me what level you're at, so let me show you all of the mathematics. If you haven't seen any of this stuff, it may look really scary! But I want to give you the impression that after you've had the right undergraduate-college course or two, this stuff is pretty easy to just write down in a Stack Overflow comment.
So in terms of the way that they interrelate with relativity, both electric and magnetic fields are derivatives of a "scalar potential" (or voltage) and a vector potential. These terms won't mean so much to you, but we say that the electric field is the (negative) gradient of the scalar potential field and the magnetic field is the (positive) curl of the vector potential field $\vec A$. This is all written in much more mathematical terms as a consequence of the Maxwell Equations,$$\begin{align}\operatorname{div} {\vec B} &= 0 ~\text{ implies }~ \vec B = \operatorname{curl} \vec A & (\text{for some } \vec A),\\\operatorname{curl} \big(\vec E + {\partial \vec A \over \partial t}\big) &= 0 ~\text{ implies }~ \vec E = - {\partial \vec A \over \partial t} - \operatorname{grad} \phi & (\text{for some } \phi).\end{align}$$ Like with any integration there is some sense of "freedom" due to constants of integration; in this case the magnetic $\vec B$ field isn't changed if we add any $\operatorname{grad} \psi$ to $\vec A$, since the curl of a gradient is zero. This will also preserve the electric $\vec E$ field if we simultaneously subtract ${\partial\psi/\partial t}$ from $\phi$. This freedom is known as the "Gauge freedom."
One particular choice of $\psi$ can then transform any potentials to be the ones satisfying the Lorenz gauge condition, $$\nabla\cdot{ \vec{A}} + c^{-2}(\partial\phi /\partial t)=0,$$which makes $(\phi/c, \vec A)$ relativistically invariant as a four-vector $A^\mu$, called the four-potential. Derivatives of this still give the electric and magnetic fields; in fact, the fields are given by the electromagnetic field tensor $$F_{\mu\nu} = \partial_\mu A_\nu - \partial_\nu A_\mu$$where to get "lowered" indices we take the temporal "upper" component and flip its sign (or in other words, the components of $\partial_\mu$ are still $(c^{-1} \partial/\partial t, \partial/\partial x, \partial/\partial y, \partial/\partial z)$ but the components of $A_\nu$ are now $(-\phi/c, A_x, A_y, A_z).$) If you just write these components with $\mu$ vertical and $\nu$ horizontal and carefully compare, you find:$$\mathbf{F} = \left[\begin{array}{cccc}0 & -E_x/c & -E_y/c & -E_z / c\\
E_x/c & 0 & B_z & -B_y \\
E_y/c & -B_z & 0 & B_x \\
E_z/c & B_y & -B_x & 0 \end{array}\right]$$So both fields combine together into this matrix which transforms, in relativity, just the way a matrix should.
Taking the product with the four-velocity $v^\nu = (\gamma ~c, \gamma ~v_x, \gamma ~v_y, \gamma ~ v_z)$ and the charge $q$ you find the 4-force $$F_\mu = \gamma~q~(-{\vec v \over c}\cdot \vec E, ~~\vec E + (\vec v \times \vec B)).$$Subtle detail: we have to say that this is $\partial p_\nu/\partial \tau$ using the proper time $\tau$; the $\gamma$ can then be absorbed by time dilation, $\gamma~d\tau = dt$, to give the usual "Lorentz force law." When we raise the component again to get a $+ q~\vec v \cdot \vec E$ term we see that this is indeed the change in the particle's energy with respect to time, which it should be, since the 4-momentum is $(E/c, p_x, p_y, p_z)$ in relativity, with $E = mc^2 + \text{kinetic energy}$.
How do we interpret this mathematics to make electric and magnetic fields equivalent?
Since $\phi$ and $\vec A$ are parts of the same 4-potential, their components intermix under a Lorentz boost in a particular direction. A Lorentz boost is the way, in relativity, that you transform between two relatively moving frames of reference.
Suppose you have the same current $I$ flowing the same way in two parallel lines. The moving current $I$ means that the electrons are moving the opposite direction relative to the mostly- stationary positive nuclei in the wire. We'd say that all of the charges are equally repelled and attracted by the electric forces; just the electrons have this mysterious "magnetic force" on them.
Control question before I reveal the connection: is this magnetic force attractive or repulsive?
So we can also characterize the force of the electrons on each other by boosting into the frame of the current. So where it looks like a current, we have a positive charge density $\lambda_+$ and a negative charge density $\lambda_- = -\lambda_+$ that perfectly balance out, but the negative charges are travellng with speed $-v$ to give a current $I = q v$. When we Lorentz-boost backwards by speed $v,$ there is no relative motion between the two charges fields and we must see zero magnetic force: but what could the electric force possibly be? Isn't everything 0?
Answer: the length contraction saves us. Yes, in the original reference frame, the charge densities were $\pm \lambda$, but since they are moving, they're not going to be the same in the new reference frame, due to length contraction. If the average spacing between electrons was $L$ with $\lambda_- = -e / L$, then L has been Lorentz-contracted from some $\ell = \gamma ~ L$, and we now see $\lambda_-' = -e / \ell = -\lambda / \gamma$. Meanwhile the moving positive nuclei now have their own Lorentz-contraction, increasing in charge density to $\lambda_+' = \gamma ~\lambda$. The magnetic field due to the moving protons exerts no force on the stationary electrons, but the net positive charge $(\gamma - 1/\gamma) \lambda$ will attract the electrons, and so we will see an attractive force. Working out the details: in the "normal" frame we have a force-per-unit-length $f = \mu_0 I^2 / (2 \pi D)$ where $D$ is the distance between them. The other way gives us an expression $\gamma~(1 - \gamma^{-2})~\lambda^2 / (2 \pi \epsilon_0 D)$ but $1 - \gamma^{-2} = v^2 / c^2$ and $c^2 = 1/(\mu_0 \epsilon_0)$ so we are seeing that the terms are identical (because $I = \lambda v$) except for the $\gamma$ up front, which again has to do with time dilation.
So the terms are deeply identical. Because the theory is relativistically covariant, they have to be.