Hi.
I'd like to take some examples for you.
1. If you meet somebody almost everyday,
Just saying '안녕하세요?' is enough.
2. If you meet somebody sometimes,
잘 지냈어? (Casual)
잘 지내셨어요? (Formal)
3. If you write a letter or send a text message to someone who you haven't met for a while,
You can start the sentence with 잘 지내?
(Let's say i was broke up 3 month ago, and my ex-boy friend wants to get in touch with me again, he would send a message that starts with ' 잘 지내?'.
ㅋㅋㅋ(ㅋㅋㅋ means lol in korean shortened online expression)
도움이 되었길 바래요 :)