In popular usage, a cameo happens when a famous person makes a brief appearance (or only plays a minor role) during a longer event.
In most cases, cameo roles are used in movies. For example, Alfred Hitchcock often appeared in his own movies. A more recent case of a cameo was Chris Gardner's appearance in The Pursuit of Happyness [sic], a movie about a period of Gardner's life. Stan Lee, the creator of a number of popular comic book characters, often appears in the movie adaptations of his characters' stories. Stephen King is also known for his cameo appearances in movies based on his books or short stories.