hello kevinsetiono!
it's easiest to think in terms of the
energy, E
for every particle, E/c
2 is proportional to 1/√(1 - v
2/c
2), where v is the speed
we call the constant of proportionality the
mass, m …
E/c2 = m/√(1 - v2/c2)
we can also write it
E√(1 - v2/c2)/c2 = m
from that we immediately see that, for a photon (for which v = c always), m = 0 …
the mass of a photon is zero
since m is the value of E/c
2 when v = 0, we also call m the
rest-mass, the energy it has when it's at rest (divided by c
2)
(obviously, a photon can't be at rest, so "rest-mass" is a meaningless name for a photon … that's why nowadays we usually prefer to call it "mass" rather than "rest-mass"

)
is magnetic field made of photon ?
the magnetic field is part of the
electromagnetic field
it isn't "made" of anything, it just "is"
light waves are a
special kind of electromagnetic field, in which the electric and magnetic parts are equal and perpendicular