To add on to the first answer, it also serves the function of an informal "Congratulations!"
So where in a formal setting, you would say something like "Congratulations on getting that promotion," in a casual/friendly setting, you could say "Kudos on getting that promotion!"