Less serious than getting together or dating. Spending time with someone in the context of friendship or in the context of casually exploring whether you like someone as just a friend or maybe more than a friend.

I'm gonna hang out with my best friend this weekend. We should hang out some time.

According to Aileen Ward's biography of John Keats (English poet (1795-1821), who took an interest in English slang of the day, "hanging out" connoted "stopping at a tavern," i.e. spending time drinking, which fully comports with the modern sense of the slang expression. This indicates that the phrase was current in London in 1816 at the latest!

"Hey, Keats, man: Byron and some of the other poetic dudes are planning to hang out at Jack Straws before we go to sup. Like to join us?"

Comes from the formal meaning of "hang out": to protrude or stick out. Hence, the use of "out" for public. Not to be confused with "hang with", which is an umbrella term that includes socializing publicly or privately.

Friend: "Dude, you never hang out with me anymore."
You: "Not true: even though I don't get out of my house much, I still socialize with you on Facebook, which can be seen by other people."
Friend: "Touché."