The phrase "hang out with friends" refers to spending time together with friends in a casual and relaxed manner. It's usually done for enjoyment, socializing, or simply enjoying each other's company without any particular agenda or activity.
The term "hang out" originated in the United States in the late 19th century. The "hang" comes from the idea of lingering in a relaxed manner, while "out" conveys the sense of spending leisure time away from home or in public spaces. Over time, it evolved to specifically mean spending time in a casual, social setting with friends.