One of the boys at Camp Green Lake is nicknamed Zero. In chapter 5, Mr. Pendanski tells Stanley that Zero is called Zero because "there's nothing inside his head." Zero later proves himself to in fact be very smart. People only assume that he is stupid because he doesn't speak and can't read. The nickname "Zero" is a cruel one, but by the end of the novel, Sachar shows us that the nickname is also inaccurate and unjustified. This helps to convey one of the broader ideas or morals in the story, which is that we should not judge or denigrate people without at least knowing them first.
Another of the boys at Camp Green Lake is nicknamed Magnet. This nickname reflects this character's ability to steal things. For example, in chapter 19, Magnet manages to steal some sunflower seeds from Mr. Sir. When one of the other boys asks Magnet how he managed to steal the seeds, Magnet laughs and replies, "My fingers are like magnets."
The main character of the novel, Stanley Yelnats, is also given a nickname at Camp Green Lake. He is nicknamed Caveman. The other boys give Stanley this nickname to deter another boy, known as The Lump (so called because of his large, intimidating size) from starting a fight with him. The other boys reason that if they start calling Stanley "Caveman," then The Lump will assume that Stanley, like a caveman, is strong and tough. Indeed, one of the boys says, for The Lump to hear, that "Caveman's one tough dude." This nickname links to the theme of friendship in the novel and the moral that people should protect those who are vulnerable. This is what the other boys at Camp Green Lake do when they give Stanley the nickname of Caveman.