Korean has speech levels. This course starts with the polite 해요체 (ending in -요), which is safe with almost anyone.
안녕하세요 literally asks "are you at peace?" and works any time of day.
Two ways to say goodbye
- 안녕히 가세요 — "go in peace": say it to the person leaving.
- 안녕히 계세요 — "stay in peace": say it to the person staying (when you leave).
Thanks: 감사합니다 (a bit more formal) and 고맙습니다 are both fine. 고마워요 is softer. Sorry: 죄송합니다 (formal, serious), 미안해요 (polite, lighter).