Here's a breakdown:
* Sawasdee (pronounced sah-wat-dee) is the general greeting, used in most situations.
* Sawasdee krap (for men) and Sawasdee ka (for women) are more formal greetings, adding a respectful ending.
* Sawasdee khun is used to address someone with respect, similar to "good morning/afternoon" in English.
Keep in mind that Thai people often use a combination of verbal greetings and the wai (a gesture of respect involving bringing your hands together in front of your chest) when greeting someone.