The simple (relatively speaking) answer is that magnetism is fundamentally a relativistic phenomenon, and relativity is what unites electricity and magnetism.
What appears to be a purely electric field in the reference frame in which the charge and body are at rest turns out to be a combination of electric and magnetic fields in a reference frame in which they are moving. By the first postulate of special relativity, neither interpretation is more correct than the other.
Wikipedia has a good explanation of electromagnetism under special relativity, however as the Maxwell Equations are compatible with special relativity they (specifically the Ampere-Maxwell law) will generally be sufficient to calculate the magnetic field produced.
A common example is to consider the magnetic field produced by a current-carrying wire. In the laboratory frame, the wire is neutrally charged, however in a moving frame, the moving electrons and the protons will contract at a different rate and hence the wire will appear to be charged. The apparent electric field is equivalent to the magnetic field in the laboratory frame.