Cueball is a stick figure character in xkcd, distinguished from other characters by having no distinguishing features (including no hair or hat). The name is unofficial, and pretty much only used here on explain xkcd.
Unlike other xkcd characters, Cueball doesn't necessarily represent the same character from comic to comic, and is not necessarily a unique character in any given strip. Instead, he represents a generic everyman. In several comics (610: Sheeple, for example) there are multiple such stick figures, any of whom could be called Cueball.
The character is never actually referred to as Cueball in xkcd. The name was developed by early contributions to explain xkcd, and has stuck. It refers to the visual similarity of Cueball's head to a billiard ball. In some strips a cueball character named Rob appears. Randall's transcripts usually refer to the character as "Man 1" etc.
We do know for sure that his name is not Terry. (Check the transcript.)