The above quotation comes from section two of Utilitarianism by John Stuart Mill. Utilitarianism is a moral philosophy which holds that the ultimate good is the pursuit of pleasure and the avoidance of pain. Actions are considered good if they promote happiness (pleasure) or bad if they promote the opposite of happiness (pain).
In this section of the book, Mill deals with the most common objections to the utilitarian philosophy. A number of critics charged that the pursuit of pleasure as the only good was somewhat undignified for human beings, and placed us on the same level as animals. After all, pigs doubtless derive considerable pleasure from rolling around in mud, but that's hardly something to which we should aspire.
Mill counters this charge by maintaining that not all pleasures are the same. There is a qualitative difference amongst them that we should acknowledge. In any case, as humans we are aware that we have a capacity to derive pleasure from more elevated pursuits than a pig. Animals don't, however, as they act entirely out of instinct in response to external stimuli. Foolish humans are similar to pigs in that they remain blithely unaware of the higher pleasures of life. But if they were aware, thinks Mill, then they would always choose to cultivate those more refined pleasures, those that truly separate us from the animals.