Stream of consciousness (psychology)
The stream of consciousness is a metaphor describing how thoughts seem to flow through the conscious mind. Research studies have shown that we only experience one mental event at a time as a fast-moving mind stream. William James, often considered to be the father of American psychology, first coined the phrase "stream of consciousness". The full range of thoughts—that one can be aware of—can form the content of this stream.

Buddhism

Early Buddhist scriptures describe the "stream of consciousness" (Pali; viññāna-sota) where it is referred to as the Mind Stream. The practice of mindfulness, which is about being aware moment-to-moment of one's subjective conscious experience  aid one to directly experience the "stream of consciousness" and to gradually cultivate self-knowledge and wisdom.
Buddhist teachings describe the continuous flow of the “stream of mental and material events” that include sensory experiences (i.e., seeing, hearing, smelling, tasting, touch sensations, or a thought relating to the past, present or the future) as well as various mental events that get generated, namely, feelings, perceptions and intentions/behaviour. These mental events are also described as being influenced by other factors such as attachments and past conditioning. Further, the moment-by-moment manifestation of the "stream of consciousness" is described as being affected by physical laws, biological laws, psychological laws, volitional laws, and universal laws.

Proponents
In his lectures circa 1838–1839 Sir William Hamilton, 9th Baronet described "thought" as "a series of acts indissolubly connected"; this comes about because of what he asserted was a fourth "law of thought" known as the "law of reason and consequent":   
"The logical significance of the law of Reason and Consequent lies in this, – That in virtue of it, thought is constituted into a series of acts all indissolubly connected; each necessarily inferring the other" (Hamilton 1860:61-62).
In this context the words "necessarily infer" are synonymous with "imply". In further discussion Hamilton identified "the law" with modus ponens; thus the act of "necessarily infer" detaches the consequent for purposes of becoming the (next) antecedent in a "chain" of connected inferences.

William James asserts the notion as follows:
"Consciousness, then, does not appear to itself chopped up in bits. Such words as 'chain' or 'train' do not describe it fitly as it presents itself in the first instance. It is nothing jointed; it flows. A 'river' or a 'stream' are the metaphors by which it is most naturally described. In talking of it hereafter let us call it the stream of thought, of consciousness, or of subjective life. (James 1890:239)
He was enormously skeptical about using introspection as a technique to understand the stream of consciousness. "The attempt at introspective analysis in these cases is in fact like seizing a spinning top to catch its motion, or trying to turn up the gas quickly enough to see how the darkness looks." However, the epistemological separation of two levels of analyses appears to be important in order to systematically understand the “stream of consciousness.”

Bernard Baars has developed Global Workspace Theory which bears some resemblance to stream of consciousness.

Conceptually understanding what is meant by the “present moment,” “the past” and “the future” can aid one to systematically understand the “stream of consciousness.”

Criticism
Susan Blackmore challenged the concept of stream of consciousness. "When I say that consciousness is an illusion I do not mean that consciousness does not exist. I mean that consciousness is not what it appears to be. If it seems to be a continuous stream of rich and detailed experiences, happening one after the other to a conscious person, this is the illusion." However, she also says that a good way to observe the "stream of consciousness" may be to calm the mind in meditation. Suggestions have also been made regarding the importance of separating “two levels of analyses” when attempting to understand the “stream of consciousness.”

Literary technique

In literature, stream of consciousness writing is a literary device which seeks to portray an individual's point of view by giving the written equivalent of the character's thought processes, either in a loose interior monologue, or in connection to his or her sensory reactions to external occurrences. Stream-of-consciousness as a narrative device is strongly associated with the modernist movement. The term was first applied in a literary context, transferred from psychology, in The Egoist, April 1918, by May Sinclair, in relation to the early volumes of Dorothy Richardson's novel sequence Pilgrimage. Amongst other modernist novelists who used it are James Joyce in Ulysses (1922) and William Faulkner in The Sound and the Fury (1929).