Use contrary when two things are exactly opposite or entirely different. If something is contrary to something else, it is opposed to or against it.
A contrary child is one who opposes people in authority. As a noun, the contrary means the opposite, as in "We will not give up; on the contrary, we will fight with all our power." The adjective contrary derives from Latin contrarius "opposite, opposed," from contra "against."