Two ducks were sitting in a pond.
Two ducks were sitting in a pond. One of the ducks said: "Quack". The other duck said: "I was going to say that!"
The humor in this joke is based on the rapid changes in mental state that the listener goes through when they hear the joke.
First, when the listener hears the setup, they probably assume that the ducks are talking ducks since this is obviously a joke.
Once the first duck says "Quack", the listener revises their assumption due to the anti-humor nature of the first duck's comment.
Finally, when the second duck replies "I was going to say that!", the listener again revises their assumption and realizes that the ducks are in fact able to talk, but that the first one had just said "Quack" for some unknown reason.
It is sort of a mental form of whiplash.
I have to admit, I like this joke.