To explain this, I'll start with a simple case and progressively develop the idea. So, first, consider just one photon. Then one may naively think that I can always boost myself into a reference frame where this photon has high enough energy to produce a pair of massive particles spontaneously. Well this doesn't work, because one photon cannot in general satisfy momentum conservation in such a spontaneous pair creation process.
So we need at least two photons. Say we start off with them both having low energy, too low to create a pair of particles. Then we boost into a reference frame where they have high enough energy. We still won't see such pair creation. The reason is that one can go the other way. If it is possible to boost the reference frame to one in which the energy of the two photons is too low to creat the pair, then it won't be able to create that pair in any reference frame.
The key is the lowest amount of energy in the system. What do I mean by that? Basically, one can consider two photons with the same energy propagating in opposite directions toward each other. Say that their combined energy is high enough to account for the masses of a pair of particles. Now one can try to boost this to any reference frame and one will find that in all such cases the energy only increases. In this case the pair of photons can successfully produce the pair of massive particles.
So with this picture in mind, one can generalize the idea to arbitrary pair creation processes in particle physics. Firstly, one needs to be able to satisfy energy and momentum conservation. This often requires two particles interacting. (The decay of unstable particles is an alternative scenario, but let's not consider that now.) One can always boost these two particles to a reference frame where they are moving in opposite directions toward each other and where their combine energy has its lowest possible value. This lowest combined energy then tells us whether the collision will be able to produce a particular pair of new particles.
This lowest energy is analogous to the rest mass of a single particle. It also sets the scale of the interaction, from which follows specific scales in particle physics, such as the QCD scale or electroweak scale.