相反 can be used as an adjective (意见相反, opposite opinions) or as a transitional phrase at the start of a sentence (相反,..., On the contrary, ...). When used at the start, it introduces a contrasting point.
usage
Compare with 反而 (fǎn'ér, instead/on the contrary), which emphasizes an unexpected reversal: 他没有生气,反而笑了 (He didn't get angry; instead, he laughed).