The Joke:
I read that giraffes can grow up to 18 feet.
The ones I've seen only had four.
In the first sentence, “18 feet” means height (a unit of measurement).
In the second sentence, the speaker pretends to interpret “feet” as body parts (like human or animal feet).