This is very common in korean culture as in many asian cultures as well. There is formal and informal way of speaking and the first method is used to speak to adults, strangers (basically someone you just met or are not really close to, someone older than you) It can also be used in korean culture, the predecessor of the same trade as you such as actors, singers, idols etc. Informal speaking you use with close companions, friends, someone younger than you etc. Using formal means that you are not that close or that you respect that person while informal usage means that you are close to that person enough so that you can speak freely. They mean the same but the tone is different.
Informal: (Hi) 안녕 (An-yeong)
Formal: (Hello) 안녕하세요 (An-yeong haseyo)
For more information, click here.