The electromagnetic interaction is mediated by the constant exchange of photons from one charged object to another. The magnetic field is really just a classical approximation to the photon-exchange picture. In a moving reference frame, a magnetic field appears instead as a combination of a magnetic field and an electric field, so electric and magnetic fields are made of the same “stuff” (photons).
Some electromagnetic interactions involve “real” photons with definite frequencies, energies, and momenta. Electrostatic and magnetic fields involve the exchange of “virtual” photons instead. Very close to an electron is a dense cloud of virtual photons which are constantly being emitted and re-absorbed by the electron. Some of these photons split into electron-positron pairs (or pairs of even heavier stuff), which recombine into photons which are re-absorbed by the original electron. These virtual particle loops screen the charge of the electron so that far away from an electron it appears as if it has less charge than close by.
Normally we wouldn’t call any of these fields “matter”, but it is true that the electric and magnetic fields which surround a charged object like an electron do store energy, and therefore have a rest mass, via E=mc^2 (in a reference frame in which the electron has no momentum). Via Physics Illinois