Oxford English Dictionary:
Humor: 9.a. The ability of a person to appreciate or express what is funny or comical; a sense of what is amusing or ludicrous [as in "sense of humor"] That quality of action, speech, or writing, which excites amusement; oddity, jocularity, facetiousness, comicality, fun.
b. With reference to action, speech, writing, etc.: the quality of being amusing, the capacity to elicit laughter or amusement. Also: comical or amusing writing, performance, etc.
Wit: 7. Quickness of intellect or liveliness of fancy, with capacity of apt expression; talent for saying brilliant or sparkling things, esp. in an amusing way.
8a. That quality of speech or writing which consists in the apt association of thought and expression, calculated to surprise and delight by its unexpectedness
Relation between humor and wit: Humor is funny in and of itself, whereas wit needs something already humorous to magnify or enhance.
Humor is inherently funny or laughable, like a child talking slightly wrong but not perceiving any error; a fat man struggling to button a tight jacket; almost anything on America's Funniest Home Videos like a big guy doing a cannonball into a small outdoor swimming pool, collapsing the sides and getting everyone wet; or "Backwards Classics," which plays videos in reverse action.
Wit is a comic form or technique that observes and magnifies the humor of the inherently humorous.
A familiar example of wit is the comic monologue, where the stand-up comedian "observes" the oddities, foolishness, or humor of human life or society, then makes these qualities funnier through association, extension, irony, or expansion.
(Stand-up comics also mimesis when they impersonate someone or something.)
Difference between humor and comedy?
Everyday speech makes little if any distinction. Literary criticism, however, observes the following differences:
(The story-line of comedy often begins with a problem or a mistake (as in mistaken identity) involving a recognizable social situation: one person being taken for another, disguises, cross-dressing, dressing up or down, or role-reversals. The action consists of characters trying to resolve the problem or live up to the demands of the false identity, or of other characters trying to reconcile the “new identity” with the “old identity.” Comedy ends with the problem overcome or the disguise abandoned. As a concluding action, characters join in marriage, song, dance, or a party, demonstrating a restoration of unity. TV "situation comedies" like Friends or Modern Family end with the characters re-uniting in a living room or some other common space.)
Hazlitt, "On Wit and Humour" (1819)
is the only animal that laughs and weeps;
for he is the only animal that is struck with the difference between what things are, and what they ought to be.
We weep at what thwarts or
exceeds our desires in serious matters:
we laugh at what only disappoints our
expectations in trifles. . . .
The essence of the laughable then is the
the disconnecting of one idea from another, or the jostling of one feeling
against another. . . . The
ludicrous is where there is the same contradiction
between the object and our expectations, heightened by some deformity or
inconvenience . . . .
Again, unconsciousness in the
person himself of what he is about, or of what others think of him, is also a
great heightener of the sense of absurdity. . . .
is the describing of the ludicrous as it
is in itself; wit is the exposing
it, by comparing or contrasting it with something else.
Humour is, as it were, the growth of nature and accident; wit is the
product of art and fancy. Humour .
. . is an imitation of the natural or acquired absurdities of mankind, or of the
ludicrous in accident, situation, and character: wit is the illustrating and heightening of the sense of that absurdity
by some sudden and unexpected likeness or opposition of one thing to another,
which sets off the quality we laugh at or despise in a still more contemptible
or striking point of view.
Dark Humor, a.k.a. Black Humor or Gallows Humor (also Dark Comedy, Black Comedy—though Black Humor or Comedy might also denote African American humor or comedy)
In dark or black humor, topics and events usually regarded as offensive or taboo, specifically those related to death or health, are treated in an unusually humorous or satirical manner while retaining their seriousness; the intent of black comedy, therefore, is often for the audience to experience both laughter and discomfort, sometimes simultaneously. (Wikipedia)
Contemporary examples: South Park, Bad Santa, M*A*S*H, It's Always Sunny in Philadelphia
Gallows humor: a gallows is a platform from which a condemned person is hanged. Thus gallows humor a type of humor that manages to be funny in the face of, and in response to, a hopeless situation.