안녕히 가십시오 means 'Goodbye' in Korean.
(in a less formal way you can say '안녕히 가세요' but it's still polite)
To your friends, you can say '안녕!' or '잘 가!'
안녕히 means 'peacefully', 'restfully' or 'without any problem',
so we also use this "안녕히" in "안녕히 주무세요"
You can say 안녕히 주무세요 to people who are older than you
And those who are younger than or the same age as you,
you can simply say '잘 자!'