QUICK ANSWER
"O" is a conjunction which is often translated as "or", and "de lo contrario" is a phrase which is often translated as "otherwise". Learn more about the difference between "o" and "de lo contrario" below.
o, la o(
oh
)A conjunction is a word that connects words, phrases, clauses, or sentences (e.g., The cat and the dog slept.).
a. either...or
Terminarás tu tarea o por las buenas o por las malas.You're going to finish your homework either the easy way or the hard way.
3. (otherwise)
a. or
La residencia del presidente de los Estados Unidos, o Casa Blanca, fue construida en 1790.The residence of the President of the United States, or the White House, was built in 1790.
A feminine noun is almost always used with feminine articles and adjectives (e.g., la mujer bonita, la luna llena).
de lo contrario(
deh
loh
kohn
-
trah
-
ryoh
)A phrase is a group of words commonly used together (e.g., once upon a time).
1. (general)
a. otherwise
Te invito a la fiesta porque quiero que vengas, de lo contrario, no lo haría.I'm inviting you to the party because I want you to come, otherwise I wouldn't do it.
b. or else
Tendría que operarse, de lo contrario, irá perdiendo gradualmente la visión de ese ojo.You should have an operation, or else you'll gradually lose the sight of that eye.