Quarks come in 3 colors (we label those "charges" color because they have similar properties to the ordinary colors, but this is a mere analogy), say red, blue and green. Gluons come in eight "pairs" colors, all possible combinations minus the "white" one. A red quark can become green by emitting for instance a red-antigreen gluon. The gluon carries energy and momentum, and is absorbed by a quark carrying green color, which becomes red. There are probabilities (amplitudes) for the process to take place depending on the combination of color, and the so called "coupling constant", which you can think of as the probability to emit a gluon in a certain volume during a certain time. Thus, quarks exchange energy and momentum depending on their color. This exchange of energy and momentum we call "force". The full story is rather complicated, because gluon themselves can emit and absorb gluons, so the coupling constant itself depends on the spacetime volume over which the process is taking place.
Consider two quarks. Due to the laws of nature, they will interact, i.e. influence each other. This interaction will cause them e.g. to move. Therefore, a force is acting on each quark due to the presence of the other.
Such forces are caused by the existence of "force carrier particles", which move between the quarks. They are continually emitted and obsorbed by the quarks. For the strong nuclear interaction, these are called gluons. For electromagnetism, they are called photons.