There are two aspects to it. And I'll be very hand-wavey because QCD is not my field.
Suppose you have two quarks and you start to pull them apart. The gluons that transmit the force between the two quarks tend to "bunch" together because they have their own charge. You can think of it roughly like a rope of gluons trying to pull the quarks back together.
If you keep pulling on the quarks, you might expect the gluons to eventually "break". But this doesn't happen, because the gluons act on each other. If there were ever a break, more gluons would join in, tugging the break back together. Eventually, you end up with so much energy density in all these gluons that they start forming new quarks and other particles. These new particles will bind with your quarks and each other to form color-neutral particles.
So I spoke a little imprecisely. Gluons, being massless, have infinite range. But you won't ever see the strong force acting over any large distance because anytime you try to get color-charged particles far enough apart, you'll end up making more particles.