One obstacle is momentum conservation: You can't just turn a single massless particle (a photon, say) into a massive one or vice versa because that would violate conservation of 4-momentum. The way out is to involve more than one massless particle in that interaction, e.g. convert two massless particles into one or more massive ones, or vice versa. (If a single massive particle is produced, the 3-momentum of the two massless particles cancels out in the center-of-mass frame, while their energy / p_0 adds up to the rest mass of the particle that's produced.)
Which interactions exactly are possible depends on the particles & forces involved, and further conservation laws for quantum numbers (e.g. charge) that the force obeys.
TL;DR Turning a single massless particle into a single massive one is not possible, you always need at least two.