It's a common greeting in Arabic-speaking cultures, similar to saying "bless you" after someone sneezes. It's a way to express concern for someone's well-being and wish them good health.
It's often used as a polite and friendly way to end a conversation, but can also be used independently as a simple greeting.