Selamat tinggal is literally "safe stay". You say it when you are leaving a place to people who are staying. If you are the one staying, you say "selamat jalan" (lit. "Safe walk") to the person leaving.
you guys are amazing. thank you for explaining the literal translation. That is so interesting & makes it much easier now to memorize the different expressions. Makasih