This is the 555th most frequent Italian word.
contrario
Opposite.
In this sentence, 'contraria' is used as an adjective that means 'opposite', describing the opinion.
Lui ha la opinione contraria alla tua.
He has the opposite opinion to yours.
Here, 'contrario' functions as an adverbial phrase 'contrary to', indicating actions that oppose established rules.
Ha agito in modo contrario alle regole.
He acted contrary to the rules.
In this case, 'contrario' acts as a noun, meaning 'opposite' or the reverse of what is expected.