Linguistic humor, Groucho Marx

Lexical ambiguity

Outside of a dog, a book is a man's best friend. Inside of a dog, it's too dark to read.

Structural ambiguity

One morning I shot an elephant in my pajamas. How he got into my pajamas I'll never know.