When speaking of philosophy and logic, one proposition is contrary to another if they cannot both be true, but they could both be false, or one false and one true.
This is compared to contradictory statements, in which both cannot be true and both cannot be false. If statements are truly contradictory, one is true, and one is false.
Contrary:
1. My pants are blue (and only blue).
2. My pants are red (and only red).
Contradictory:
A. My pants are blue.
B. My pants are not blue.
It is possible that my pants are purple, making 1., 2., and A. false. Contrary propositions leave room for alternative possibilities, in which both might be false. Contradictory propositions leave no room; one is true and one is not.
There is also the most excellent word subcontrary, in which one preposition must be true, and both may be true.