Discussing the avoidance of pains and the seeking of pleasures, St. Thomas says:
I answer that, The desire for pleasure is of itself more eager than the shunning of sorrow. The reason of this is that the cause of pleasure is a suitable good; while the cause of pain or sorrow is an unsuitable evil. Now it happens that a certain good is suitable without any repugnance at all: but it is not possible for any evil to be so unsuitable as not to be suitable in some way. Wherefore pleasure can be entire and perfect: whereas sorrow is always partial. Therefore desire for pleasure is naturally greater than the shunning of sorrow. Another reason is because the good, which is the object of pleasure, is sought for its own sake: whereas the evil, which is the object of sorrow, is to be shunned as being a privation of good: and that which is by reason of itself is stronger than that which is by reason of something else. Moreover we find a confirmation of this in natural movements. For every natural movement is more intense in the end, when a thing approaches the term that is suitable to its nature, than at the beginning, when it leaves the term that is unsuitable to its nature: as though nature were more eager in tending to what is suitable to it, than in shunning what is unsuitable. Therefore the inclination of the appetitive power is, of itself, more eager in tending to pleasure than in shunning sorrow.
But it happens accidentally that a man shuns sorrow more eagerly than he seeks pleasure: and this for three reasons. First, on the part of the apprehension. Because, as Augustine says (De Trin. x, 12), “love is felt more keenly, when we lack that which we love.” Now from the lack of what we love, sorrow results, which is caused either by the loss of some loved good, or by the presence of some contrary evil. But pleasure suffers no lack of the good loved, for it rests in possession of it. Since then love is the cause of pleasure and sorrow, the latter is more the shunned, according as love is the more keenly felt on account of that which is contrary to it. Secondly, on the part of the cause of sorrow or pain, which cause is repugnant to a good that is more loved than the good in which we take pleasure. For we love the natural well-being of the body more than the pleasure of eating: and consequently we would leave the pleasure of eating and the like, from fear of the pain occasioned by blows or other such causes, which are contrary to the well-being of the body. Thirdly, on the part of the effect: namely, in so far as sorrow hinders not only one pleasure, but all.
He adds in response to a saying of St. Augustine,
The saying of Augustine that “sorrow is shunned more than pleasure is sought” is true accidentally but not simply. And this is clear from what he says after: “Since we see that the most savage animals are deterred from the greatest pleasures by fear of pain,” which pain is contrary to life which is loved above all.
In other words, people avoid physical pain because it is related to damage to the body and ultimately to death, and great physical pain to great damage and thus possibly immediate death. In this sense, people will avoid such pain first, in preference to seeking any physical pleasure.
Once one has avoided such immediate damage to the body, human nature is preserved in basically two ways, in the individual by way of food and drink, and in the species by reproduction. Thus St. Thomas says that the virtue of temperance is related to the pleasures related to these modes of preservation:
I answer that, As stated above, temperance is about desires and pleasures in the same way as fortitude is about fear and daring. Now fortitude is about fear and daring with respect to the greatest evils whereby nature itself is dissolved; and such are dangers of death. Wherefore in like manner temperance must needs be about desires for the greatest pleasures. And since pleasure results from a natural operation, it is so much the greater according as it results from a more natural operation. Now to animals the most natural operations are those which preserve the nature of the individual by means of meat and drink, and the nature of the species by the union of the sexes. Hence temperance is properly about pleasures of meat and drink and sexual pleasures. Now these pleasures result from the sense of touch. Wherefore it follows that temperance is about pleasures of touch.
Thus we could divide physical pleasures into three kinds: general physical pleasures, such as the feeling of sitting in a comfortable chair, which are not directly related to the preservation of human nature, but are at least opposed to physical pains; pleasures of eating and drinking, which are related to the preservation of the individual; and sexual pleasures, which are related to the preservation of the species.
Just as people will accept the deprivation of physical pleasures in order to avoid pain, so people would accept the deprivation of sexual pleasures in order to avoid starvation.
We could look at this in terms of the more necessary and the better. Avoiding damage to the body is more necessary than nourishment, but nourishment is better; and avoiding the deprivation of nourishment is more necessary than reproduction, but reproduction is better. Consequently the pleasures of food and drink tend to be physically more intense than general physical pleasures, and sexual pleasures more intense than those of food and drink.