Oscar Wilde's The Importance of Being Earnest is a comedy of errors, meaning that it satirizes the manners, attitudes, and behaviors of the upper classes. As well as satire, much of the comedy of the play also derives from a liberal use of irony.
Lady Bracknell is perhaps the most obvious example of satire in the play. She is a personification of the Victorian upper classes, and to that end, she is foolish, cynical, and pretentious. Algernon is also representative of the Victorian upper classes. He lives a lavish and idle life, and, as Lady Bracknell says, he has "nothing but his debts to depend upon."
Irony in the play takes two main forms. There is situational irony, where events or behaviors that unfold are contrary to what the audience or the characters might expect to happen, and then there is dramatic irony, which is when the audience knows something that one or more of the characters on stage do not. A good example of situational irony is when Lady Bracknell comments that her friend, Lady Harbury, has recently become a widow. Contrary to what we might expect, Lady Bracknell informs us that Lady Harbury "looks quite twenty years younger." A good example of dramatic irony is the mistaken belief of both Gwendolyn and Cecily that they are both engaged to marry the same man, named Ernest. The audience, however, is aware that the men they are in love with are only pretending to be the same person.
As to the question about whether there is a difference between being "witty" and being "funny," perhaps the best answer is that one can be funny without being witty but perhaps not witty without being funny.