My Korean friend tried explaining this to me, but he basically was like it is a question marker...or something lol

I am so confused.