Stream of consciousness in literature is a narrative mode that takes the reader inside the mind of the character to follow his or her thought patterns. Though in some cases it does help to further the plot, in most cases stream of consciousness allows the reader to get to know the character a bit better. It can be a bit difficult to follow, because it often does not follow a set linear model or logical pattern, as it is intended to be written in the way people actually think, which tends to be disjointed and rather free-associative. Perhaps the most well known example of stream of consciousness in literature is James Joyce's novel, Ulysses.
As a literary device, stream of consciousness generally falls under the purview of more experienced writers. This is because it can be complex and difficult to write well, particularly in a way that is understandable by the reader. If done poorly, stream of consciousness in literature can make the work virtually impossible to comprehend. Many writers will frequently add references to other works of literature or other common literary symbols in stream of consciousness pieces, to make them more complex yet richer in meaning as well.
The role of stream of consciousness in literature is typically as a character study. The character is not speaking to the audience in this literary device, as he or she is in a monologue, but is rather speaking to himself. Though the character may be analyzing events that happened in the story, and moving the plot along in that way, typically the character is examining his or her response to the events. Usually, this is a literary technique that the author will dip into and out of throughout the story, though some writers will produce an entire novel in this stream of consciousness format, with the character acting as the narrator.
Another technique frequently used with stream of consciousness is the discussion of a character's memories as well as thoughts, feelings, and responses to current events. This contributes to the non-linear sense that stream of consciousness communicates. Often, these memories will be used as a method of flashback or foreshadowing, to allow the reader to begin to guess what might happen later in the text. This is particularly true when entire novels are written in this format, rather than brief interludes to listen to an internal monologue from a character.