I know it's a way of greeting someone, but I am not so sure when should I be using it, and how they differ from "hey" or "hi".
It's a personal preference. Both "hi there" and "hi" are informal greetings that can be used interchangeably. That being said, I rarely (if ever) hear someone use "hey there" or "hi there". I would say that those forms have fallen into relative disuse.
If you happen to be a Mouseketeer in the 1950's, you may not have a choice in the matter.