The two words "Thank you" is a way to tell someone your grateful for something they did/do.
P1: Thank you for helping me.
P2 You're welcome!
It's just a way to greet someone or to start a conversation like for example:
P1: Hello, How are you?
P2: I'm doing alright, thanks for asking.
Hello, thank you for reading this.