I was reading this- https://en.wikipedia.org/wiki/Matter and in the first paragraph I got across the line stating - "... massless particles may be composed to form objects that have mass (even when at rest)."
From another Wikipedia article I got to knew that there are only two massless particles viz. photon and gluon. So, how is this feasible that many photons/gluons can be compsoed to form object that have mass? Is it through the pair production from the energy that photon carries or is it something else? Can pair production like thing happen with gluons too?