The text is a play on the traditional grammatical rule that a sentence should not end with a preposition. The humor arises from the fact that the sentence itself ends with the word 'with', which is a preposition, thus intentionally breaking the rule it mentions.
A preposition is a poor word to end a sentence with .