Contradiction

Broadly speaking, a contradiction is when two or more statements, ideas, or actions are seen as incompatible. One must, it seems, reject at least one of the ideas outright.
In logic, contradiction is defined much more specifically, usually as the simultaneous assertion of a statement and its negation ("denial" can be used instead of "negation"). (See law of noncontradiction.) This, of course, assumes that "negation" has a nonproblematic definition.
In colloquial speech and in dialectical methodology, the word "contradiction" has a completely different meaning than in formal logic.
Contents 
"Contradiction" outside of formal logic
Colloquial speech
In everyday speech, "contradiction" may be used in a much less rigorous way than in formal logic. For example, there is nothing logically contradictory involved in a man condemning the members of his church for not giving the church enough financial support even though he never puts anything in the collection plate when it goes around. In ordinary language we would be quite inclined to say that his actions contradict his words, but the immediate connection of this usage to the logical usage is unclear. Hypocrisy is certainly lamentable but it's hard to say that it's logically incoherentour hypothetical churchgoer, after all, is not clearly asserting anything by refusing to put money in the collection plate, let alone the logical negation of what he asserted.
One way to understand the colloquial usage might be to shift grounds from logical contradiction to what some philosophers describe as a performative contradiction. A hypocrite is not saying anything that contradicts the general principles that he asserts to be true; but his actions, in some sense, presuppose that those principles are false. Similarly, "I cannot assert anything." is a sentence that noone can truly utter. This is not because of a logical contradiction in the sentenceit is, for example, true of the braindead. But there is a performative contradiction involved in the act of saying it; for to say it presupposes that you can assert something.
Dialectical methodology
This is the meaning of "contradiction" in dialectical thinking or methodology, as with G.W.F. Hegel or Karl Marx. For them a "contradiction" does not refer to a conflict purely in a person's thinking or in logic. Rather, it indicates, for example, a clash between one's theory and one's practice, or one's words and one's deeds. It is thus more of a practical, empirical, or realworld phenomenon than is a logical contradiction. For example, for Marx, capitalism involves a social system that has "contradictions" in the sense that the classes have conflicting collective goals and in the sense that even the powerful capitalists do not always attain their goals. In Marx's view, realworld contradictions  based in the social structure  lead to conflict, crisis, and/or societal change.
The idea of a contradiction as a conflict based in the structure of a social situation is not unique to Marxian thought. For example, for liberal thinkers, the problem of public goods may be interpreted as a "contradiction": there is a conflict between what's good for society (the production of a public good such as national defense) and what's good for individual free riders, who refuse to pay the costs of the public good. This is one interpretation of Hegel's view of contradictions, seen for example in Paul Deising, Hegel's Dialectical Political Economy (ISBN 0813391318).
"Contradiction" in formal logic
Proof by contradiction
In deductive logic (and thus, also, in mathematics), a contradiction is usually taken as a sign that something has gone wrong, that you need to retrace the steps of your reasoning and "check your premises." This has been used to great effect in mathematics through the method of proof by contradiction (also known as indirect proof): since a contradiction can never be true, it can thus never be the conclusion of a valid argument with all true premises. To construct a proof by contradiction, then, you construct a valid proof from a set of premises to a conclusion that is a logical contradiction. Since the conclusion is false, and the argument is valid, the only possibility is that one or more of the premises are false. This method is used in many key mathematical proofs, such as Euclid's proof that there is no greatest prime, and Cantor's diagonal proof that there are uncountably many real numbers between 0 and 1.
A paradox involving contradiction
Contradiction is associated with several notorious paradoxes. One of these is that in firstorder predicate calculus any proposition (aka statement) can be derived from a contradiction. In other words, according to the predicate calculus, no matter what P and Q mean, if P and notP are both true, then Q is true. In expression of this fact, contradictions are said to be "logically explosive" in firstorder logic.
Thus, for example, the following argument is strictly valid, i.e. the premise logically entails the conclusion:
 Premise: 5 is both even and odd. (In our above formulation, this is P and notP.)
 Conclusion: God exists. (This is Q.)
But atheists have no less reason to celebrate than theists, for this argument is also valid:
 Premise: 5 is both even and odd. (This is P and notP.)
 Conclusion, God does not exist. (This is Q.)
Note that the premise shared by both arguments is incorrect; 5 is odd, but is not even. Therefore neither of these arguments are sound, which means neither gives a logical basis for believing its conclusion.
Nonetheless, perhaps most people find it odd that, if 5 were both even and odd, one could logically conclude anything about such an apparently unrelated matter as the existence of God. Stranger yet, the paradox implies that, if a person has any two beliefs that are contradictory, then that person is logically justified in any conceivable belief! [Is this to imply that for one matter to be both true and false necessarily implies the simultaneous truth and falsity of every other thing?]
Proof of the paradox
Even though the basic rules of predicate calculus may each sound like good ways of reasoning, they collectively entail our paradox. Two ways of showing this follow.
The first way follows from the truth table definition of conjunction and implication:
 (P and ¬P) is false. (See the truth table for Logical conjunction.)
 Therefore, (P and ¬P) → Q is true. (See the truth table for Logical implication.)
The second might interest those who find truth tables aesthetically flawed:
 Suppose P and ¬P. Under this assumption we can derive:
 P (Conjunction elimination)
 ¬P (Conjunction elimination)
 Suppose ¬Q. Under this assumption we can derive:
 P (Copying from above)
 Thus ¬Q → P (Conditional proof)
 ¬P → Q (Contrapositive of previous line)
 Q (Modus ponens)
 Thus (P and ¬P) → Q (Conditional proof)
Contradictions and philosophy
Coherentism is an epistemological theory in which a belief is justified based at least in part on being part of a noncontradictory system of beliefs. ("Contradictory" here is almost always taken in the formal logic sense.)
See also
fr:Contradiction ko:모순 lt:Prieštaravimas is:Mótsögn ja:矛盾 ru:Противоречие sv:Motsägelse