A counterexample is an example that is opposite to a theory or argument.
In Science and Logic
A counterexample cannot disprove correlation or causation. An example of flawed liberal logic is the use of a counterexample to argue that a theory is false, as in "I don't go to church and I'm not a bad person, and therefore church is not needed."
Another example is the well-proven theory that cigarettes cause lung cancer. An counterexample of the (rare) individual who might smoke his entire life and not develop lung cancer. The counterexample does not disprove the theory.
A theory of universality, such as the claim that all species evolved, can be disproved by just one counterexample, such as a species (like the whale) that lacks a plausible evolutionary path. See Counterexamples to Evolution, Counterexamples to Relativity.
The word counterexample originated in mathematics. It means an example that contradicts a general statement; therefore, the single example proves the statement false. Consider the statement
"Every number ending in the digit 7 is prime." 7, 17, 37, 47, 57, and 67 are all prime, but 27 is not, so 27 is a counterexample.