In which situations can I use "oiga!" and "oye!"? The dicctionary here says ¡oye! -> hey! but could I also say "Oye Carmen!" "Hey Carmen!" like I could do in English as a greeting''? I know that these two words come from oír but I don't know in which context I can use them... It's also very confusing that "¡oiga, por favor!" means "excuse me!" ...
¡Oiga! and ¡Oye!
Oye is third person indicative of oír(he/she hears or listens)
The third person singular indicative of a verb is also the "tú" form of the imperative, which is used in Spain. This is the most likely interpretation if you say it with exclamation marks:
¡(You), listen! or "¡Hey!"
"Oiga", on the other hand, is the "usted" equivalent form, used in Spain in formal situations, like:
¡(Please), listen! or ¡Excuse me!
Take the famous Santana hit "¿Oye,cómo va'"
The, this is a common misunderstanding, but you are confusing two very similar phrases. ¿Oye,cómo va? is a question and means what you say, roughly, "Hey, what's up'" However, the lyrics of the song are "Oye como va mi ritmo." Note that there is no tilde or comma and that it is a command, not a question. Literally, it is "Listen to how my rhythm goes." If it were the question form, then the "mi ritmo" part would make no sense.
Oye is third person indicative of oír(he/she hears or listens), and is often used in the way you mentioned(Oye, Carmen). Take the famous Santana hit "¿Oye,cómo va'" Oiga is third person imperative. It's a command. The natives will no doubt offer more. I'm just another student.