Drama, Comedy, Satire and Parody
In the most basic sense, The Importance of Being Earnest is a drama... because it’s a play. It's also a comedy—not only in the modern laugh-out-loud way, but also in the classical sense, in that it features a set of characters overcoming adversity to achieve a happy ending.
Earnest is the classic marriage comedy, where couples fall in love, but can't be together for various reasons. However, hidden identities are revealed, class differences are resolved, families are reunited, and Lady Bracknell’s consent is given to all the couples. Cue the wedding bells, y'all.
Earnest is also a satire because it makes fun of its characters—most of whom are members of the aristocratic class. Think about how proud Lady Bracknell is, and how fond she is of scandal. When she arrives late at Algernon’s place, she explains that she was visiting Lady Harbury, who "looks quite twenty years younger" since "her poor husband’s death" (I.111).
Wilde constantly exaggerates the upper class’s shallowness and frivolity to show their corrupt morals. When Lady Bracknell interrogates Jack, we learn that all she cares about is his money, his trendiness, and his family name.