Funny trick questions are often related to logic, as in the following example: If a farmer had 15 sheep and all but eight died, how many sheep are left? The answer is the eight sheep that didn't die. People expect to have to do math with problems like that, making this a trick question.
Another example of a funny trick question sets a scene first: A man wearing all black is walking down a country lane. A large, black car without its lights on races around the corner and screeches to a stop. How did the driver see the man walking? The answer is that it was daytime. Because of the emphasis on the man's black clothing and the car's lack of lights, the listener assumes it was night, though that is never directly stated.
Another version of this is the following: If a truck driver is going the wrong way down a one-way street and passes several policemen, why is he not stopped? The answer is that he is walking -- just because he is a truck driver doesn't mean he's driving his truck at that moment.
For some trick questions, the listener really has to pay attention: How can a person go eight days without sleep? The answer is there is no problem as people usually sleep at night. Another version of this is the following: If a rooster lays an egg on the top of a roof, which way does the egg roll off? The answer is it doesn't -- roosters don't lay eggs.