It means to greet another person. It shares a striking resemblance to the word "hello" both visually and grammatically. It is usually used in texting as a shorter way of saying "Hello" but a less chliché way of saying "Hi".
Hey, dude! (It means "Hello, my dear friend." in formal English in case you were wondering.)