Gate control theory, proposed by Melzack and Wall, is relevant to biofeedback for pain because it explains how: