Give me all the money or you're geography!
A bank robber pulls out gun points it at the teller, and says, "Give me all the money or you're geography!" The puzzled teller replies, "Did you mean to say 'or you're history?'" The robber says, "Don't change the subject!"
First and foremost this is a pun. The critical element of the joke is when the robber says "Don't change the subject". The word subject applies to a field of study in school, as well as the topic of conversation, and his sentence could apply to both.
There is also a little bit of humor to be derived from the entire situation. The bank robber made a mistake, and the teller corrected him, as if there were not a bank robbery. People acting in out of context ways is often humorous, as are people making mistakes.