In xkcd, there is a cast of recurring characters which are often the focus of comic strips. The characters are created by Randall Munroe. Nearly all of the human characters in xkcd are stick figures, most of whom have distinguishing features.
The most frequently appearing characters in xkcd are Cueball and Megan, who act as the everyman and everywoman. They tend to be the go-to characters when no specific personality traits are desired for the comic, as they have the most basic appearance. Cueball is a stick figure with no distinguishing characteristics, while Megan's only characteristic is her shoulder-length black hair which identifies her as female. Other characters with more distinctive personalities have been created and are used where appropriate.
It is noted that Randall has never clarified whether visually-identical characters in different xkcd comics are in fact the same character, or are simply of the same archetype represented by the appearance of the character. For the purposes of Explain xkcd, each character "appearance" is treated as a unique character and recurring characters are generally given a name. Usually the name is unofficial and has been created by Explain xkcd for ease of reference in explaining the comics.
Randall Munroe does not appear to have had a fixed cast of characters in mind when he first created xkcd. The first comic, 1: Barrel - Part 1, features a non-stick figure character in a style that he no longer uses in the comic. The next four comics do not feature characters at all. The first use of stick figures was in the sixth comic, 6: Irony, in which two basic and roughly-drawn stick figures are depicted (either of which would qualify as a "Cueball" figure). In comic 9: Serenity is coming out tomorrow, Randall includes stick-figure versions of the cast of Serenity.
Beginning in 12: Poisson, Randall began using stick figures regularly in xkcd strips. This features "Cueball" character, as well as a character with a Black Hat. Thereafter, a character featuring a black hat recurs many times in the series. The next appearance of a black-hatted character is in 29: Hitler, in which there is clear reference in the title-text to "the hat guy". This is the first indication we have that Randall had begun contemplating recurring characters (although it is not conclusively clear that the hatted characters in "Poisson" and "Hitler" were intended to be the same character.
Throughout the early period of xkcd, random non-recurring characters continue to be used, including ones with facial features, and characters with various hairstyles which are no longer seen. Over the course of the early comics, Randall appears to have refined his cast of characters (or character-types) to less than ten "regulars", along with a handful of minor recurring characters (or character-types). The characters are rarely named in-comic or otherwise, and most names used by Explain xkcd are unofficial and chosen by the group.
Even when a character name has an origin in a comic like Megan and Danish, it is not necessarily that supposed to be a generic name, but only a name in that single comic. For instance there is a Cueball character that is named Rob, and appears in 9 comics. This did not, however, change Cueball's name like it did for Megan based on just one comic: 159: Boombox.
 Cast of characters
Cueball has generally always been the go-to "standard" character where nothing special is required for a male character, as there would have been no need to add any distinguishing features. The character has been used in comics apparently referencing Randall himself, and some comics contain multiple Cueballs. The un-featured Cueball character is the strongest example of a "character" that is not necessarily a single recurring character every time it appears, but rather an archetype representing the every-man. Megan (distinguished by her shoulder-length black hair) is used as a female equivalent to Cueball and again, may simply be an archetype.
An alternate male and female were created, being Hairy and Ponytail, perhaps to avoid using multiple Cueballs and Megans in one comic. They generally appear when an extra male or female are needed in a strip.
Other recurring characters include the sadistic and manipulative Black Hat, and his female counterpart Danish; the philosophical and surreal Beret Guy; and White Hat who is often given a fatal flaw or annoying tendency.
Randall sticks with his regulars for most of his comics. One-time characters and infrequently recurring characters are rare. Real-world people are also sometimes depicted in stick-figure form in xkcd.
Other than in early comics, Randall's characters rarely have facial features (i.e. eyes, nose, mouth) and generally express emotion by their words or body language.