Essentially, this theory held that the human body was filled with four basic substances, called four humours, or humors, which are in balance when a person is healthy. All diseases and disabilities resulted from an excess or deficit of one of these four humors. The four humors were identified as black bile, yellow bile, phlegm, and blood. Greeks and Romans, and the later Muslim and Western European medical establishments that adopted and adapted classical medical philosophy, believed that each of these humors would wax and wane in the body, depending on diet and activity. When a patient was suffering from a surplus or imbalance of one fluid, then his or her personality and physical health would be affected. This theory was closely related to the theory of the four elements: earth, fire, water and air - earth was predominantly present in the black bile, fire in the yellow bile, water in the phlegm, and all four elements were present in the blood.
Theophrastus and others developed a set of characters based on the humors. Those with too much blood were sanguine. Those with too much phlegm were phlegmatic. Those with too much yellow bile were choleric, and those with too much black bile were melancholic. The idea of human personality based on humors contributed to the character comedies of Menander and, later, Plautus.
Through the neo-classical revival in Europe, the humor theory dominated medical practice, and the theory of humoral types made periodic appearances in drama. Such typically "eighteenth-century" practices as bleeding a sick person or applying hot cups to a person were, in fact, based on the humor theory of surpluses of fluids (blood and bile in those cases). Ben Jonson wrote humor plays, where types were based on their humoral complexion.
Additionally, because people believed that there were finite amounts of humors in the body, there were folk/medical beliefs that the loss of fluids was a form of death.
So when they talk about a sense of humor, you now know they really mean someone who is sanguine, or who possesses a lot of blood, one of the humors.