During the Enlightenment, a type of literature that we haven't seen before becomes popular: the mock-heroic and the mock-epic. These types had been around for centuries, dating back to the 7th century b.c. - The Battle of Mice and Frogs, attributed to Homer.
The mock-heroic poem & mock-epic follow the conventions of their counterparts, but in a satiric, humorous way. The humor comes from the way that the elevated style contrasts with the definitely unheroic subect matter.
The "hero" of this mock heroic poem is Thomas Shadwell, who deemed himself to be the heir of the great Ben Johnson. Dryden instead proclaims him to be the son and heir of Richard Flecknoe, a no-talent hack who had died in 1678. "Mac" means "son of."
Dryden abbreviates the name Thomas Shadwell with "Sh---". Such abbreviations were popular - Shadwell couldn't "prove" the poem was about him. What made this abbreviation even better was that it also stood for "shit."
Dryden and Shadwell had carried on a public dispute for years over the quality of Johnson's plays, which Shadwell liked better than Dryden did. Dryden wrote this poem to ridicule Shadwell.
In the poem, Flecknoe is passing on his talent of dullness and stupidity to Shadwell, his supposed son.