As an adjective:
* Contrary to popular belief, the Earth is not flat. (meaning the opposite of)
* The evidence presented was contrary to his initial claims. (meaning conflicting with)
* He had a contrary personality, often disagreeing with everyone. (meaning stubborn or obstinate)
As a noun:
* He acted in direct contrary to the company's policy. (meaning the opposite of)
* The contrary to his statement was proven by the witness. (meaning the opposite of)
* The lawyer presented the contrary argument. (meaning the opposing argument)
In a phrase:
* Contrary to expectations, the weather was beautiful. (meaning against expectations)
* On the contrary, I believe you are completely right. (meaning to the opposite)
* To the contrary, I have no intention of leaving. (meaning the opposite is true)
Remember, "contrary" can be used in various ways depending on the context.