The proper German word for 'hello' is
'Hallo!'
but 'Hi' or 'Hey' are also used frequently
If you want to greet someone in a more polite way you say:
'Guten Tag.'
which means 'good day', you can also change 'Tag' to 'Morgen'(morning) or 'Abend'(evening).
Guten Tag can also be used to say goodbye, but there are also other ways:
Tschüss! (bye)
Bis bald/dann! (roughly: See you soon/later)
Auf Wiedersehen. (means roughly: let's see each other again)
Another way, which ist especially used in southern Germany and Austria is
'Grüß Gott.'
Which literally means'Salute God' and has the meaning of 'god bye' as well as 'hello'