Is It Better To Say Hi Or Hey?

Which is better hi or hey?

.

Is it rude to say hey instead of hi?

Is Hey a rude greeting?

Is Hey an appropriate greeting?