A cue ball was a type of ball used in the game of billiards.
A common strategy in the game if one couldn't make a shot was to call a safety, sending the cue ball into a position where one's opponent couldn't make their shot either. While playing billiards with Gaunt Gary, Tom Paris, and Tuvok in 2371, Gary encouraged Neelix to call a safety to prevent the Vulcan from making his shot either. Nevertheless, Tuvok tried the shot anyway and failed. (VOY: "Jetrel")
In 2378, after Q Junior gave him the nickname "Itchy", Icheb reciprocated by calling the Q "Q-Ball". (VOY: "Q2")