A flashback (sometimes called an analepsis) is an interjected scene that takes the narrative back in time from the current point in the story. Flashbacks are often used to recount events that happened before the story's primary sequence of events to fill in crucial backstory. In the opposite direction, a flashforward (or prolepsis) reveals events that will occur in the future. Both flashback and flashforward are used to cohere a story, develop a character, or add structure to the narrative. In literature, internal analepsis is a flashback to an earlier point in the narrative; external analepsis is a flashback to a time before the narrative started.
In film, flashbacks depict the subjective experience of a character by showing a memory of a previous event and they are often used to "resolve an enigma". Flashbacks are important in film noir and melodrama films.  In movies and television, several camera techniques, editing approaches and special effects have evolved to alert the viewer that the action shown is a flashback or flashforward; for example, the edges of the picture may be deliberately blurred, photography may be jarring or choppy, or unusual coloration or sepia tone, or monochrome when most of the story is in full color, may be used. The scene may fade or dissolve, often with the camera focused on the face of the character and there is typically a voice-over by a narrator (who is often, but not always, the character who is experiencing the memory).
An early example of analepsis is in the Ramayana and Mahabharata, where the main story is narrated through a frame story set at a later time. Another early use of this device in a murder mystery was in "The Three Apples", an Arabian Nights tale. The story begins with the discovery of a young woman's dead body. After the murderer later reveals himself, he narrates his reasons for the murder in a series of flashbacks leading up to the discovery of her dead body at the beginning of the story. Flashbacks are also employed in several other Arabian Nights tales such as "Sinbad the Sailor" and "The City of Brass".
Analepsis was used extensively by author Ford Madox Ford, and by poet, author, historian and mythologist Robert Graves. The 1927 book The Bridge of San Luis Rey by Thornton Wilder is the progenitor of the modern disaster epic in literature and film-making, where a single disaster intertwines the victims, whose lives are then explored by means of flashbacks of events leading up to the disaster. Analepsis is also used in Night by Elie Wiesel. If flashbacks are extensive and in chronological order, one can say that these form the present of the story, while the rest of the story consists of flash forwards. If flashbacks are presented in non-chronological order, the time at which the story takes place can be ambiguous: An example of such an occurrence is in Slaughterhouse-Five where the narrative jumps back and forth in time, so there is no actual present time line. Os Lusíadas is a story about voyage of Vasco da Gama to India and back. The narration starts when they were arriving Africa but it quickly flashes back to the beginning of the story which is when they were leaving Portugal.
The Harry Potter series employs a magical device called a Pensieve, which changes the nature of flashbacks from a mere narrative device to an event directly experienced by the characters, who are thus able to provide commentary.
The creator of the flashback technique in cinema was Histoire d’un crime directed by Ferdinand Zecca in 1901.  Flashbacks were first employed during the sound era in Rouben Mamoulian's 1931 film City Streets, but were rare until about 1939 when, in William Wyler's Wuthering Heights as in Emily Brontë's original novel, the housekeeper Ellen narrates the main story to overnight visitor Mr. Lockwood, who has witnessed Heathcliff's frantic pursuit of what is apparently a ghost. More famously, also in 1939, Marcel Carné's movie Le Jour Se Lève is told almost entirely through flashback: the story starts with the murder of a man in a hotel. While the murderer, played by Jean Gabin, is surrounded by the police, several flashbacks tell the story of why he killed the man at the beginning of the movie.
One of the most famous examples of a flashback is in the Orson Welles' film Citizen Kane (1941). The protagonist, Charles Foster Kane, dies at the beginning, uttering the word Rosebud. The remainder of the film is framed by a reporter's interviewing Kane's friends and associates, in a futile effort to discover what the word meant to Kane. As the interviews proceed, pieces of Kane's life unfold in flashback, but Welles' use of such unconventional flashbacks was thought to have been influenced by William K. Howard's The Power and the Glory. Lubitsch used a flashback in Heaven Can Wait (1943) which tells the story of Henry Van Cleve. Though usually used to clarify plot or backstory, flashbacks can also act as an unreliable narrator. The multiple and contradictory staged reconstructions of a crime in Errol Morris's 1988 documentary The Thin Blue Line are presented as flashbacks based on divergent testimony. Akira Kurosawa's 1950 Rashomon does this in the most celebrated fictional use of contested multiple testimonies.
Sometimes a flashback is inserted into a film even though there was none in the original source from which the film was adapted. The 1956 film version of Rodgers and Hammerstein's stage musical Carousel used a flashback device which somewhat takes the impact away from a very dramatic plot development later in the film. This was done because the plot of Carousel was then considered unusually strong for a film musical. In the film version of Camelot (1967), according to Alan Jay Lerner, a flashback was added not to soften the blow of a later plot development but because the stage show had been criticized for shifting too abruptly in tone from near-comedy to tragedy.
In Billy Wilder's film noir Double Indemnity (1944), a flashback from the main character is used to provide a confession to his fraudulent and criminal activities. Fish & Cat is the first single-shot movie with several flashbacks.
A good example of both flashback and flashforward is the first scene of La Jetée (1962). As we learn a few minutes later, what we are seeing in that scene is a flashback to the past, since the present of the film's diegesis is a time directly following World War III. However, as we learn at the very end of the film, that scene also doubles as a prolepsis, since the dying man the boy is seeing is, in fact, himself. In other words, he is proleptically seeing his own death. We thus have an analepsis and prolepsis in the very same scene.
Occasionally, a story may contain a flashback within a flashback, with the earliest known example appearing in Jacques Feyder's L'Atlantide. Little Annie Rooney (1925) contains a flashback scene in a Chinese laundry, with a flashback within that flashback in the corner of the screen. In John Ford's The Man Who Shot Liberty Valance (1962), the main action of the film is told in flashback, with the scene of Liberty Valance's murder occurring as a flashback within that flashback. Other examples that contains flashbacks within flashbacks are the 1968 Japanese film Lone Wolf Isazo and 2004's The Phantom of the Opera, where almost the entire film (set in 1870) is told as a flashback from 1919 (in black-and-white) and contains other flashbacks; for example, Madame Giry rescuing the Phantom from a freak show. An extremely convoluted story may contain flashbacks within flashbacks within flashbacks, as in Six Degrees of Separation, Passage to Marseille, and The Locket.
This technique is a hallmark of Kannada movie director Upendra. He has employed this technique in his movies - Om (1995), A(1998) and the futuristic flick Super (2010) - set in 2030 containing multiple flashbacks ranging from 2010 to 2015 depicting a Utopian India.
Satyajit Ray experimented with flashbacks in The Adversary (Pratidwandi, 1972), pioneering the technique of photo-negative flashbacks. He also uses flashbacks in other films such as Nayak (1966), Kapurush- O - Mahapurush ( 1965), Aranyer Din Ratri (1970), Jalsaghar(1959). In fact, in Nayak, the entire film proceeds in a non linear narrative which explores the Hero (Arindam's) past through seven flashbacks and two dreams. He also uses extensive flashbacks in the Kanchenjunga (1962).
Quentin Tarantino makes extensive use of the flashback and flashforward in many of his films. In Reservoir Dogs (1992), for example, scenes of the story present are intercut with various flashbacks to give each character's backstory and motivation additional context. In Pulp Fiction (1994), which uses a highly nonlinear narrative, traditional flashback is also used in the sequence titled "The Gold Watch". Other films, such as his two-part Kill Bill (Part I 2003, Part II 2004), also feature a narrative that bounces between present time and flashbacks.
The television series Quantico, Kung Fu, Psych, How I Met Your Mother, Grounded for Life, Once Upon a Time, and I Didn't Do It use flashbacks in every episode. Flashbacks were also a predominant feature of the television shows Lost, Arrow, Phineas and Ferb, Orange Is the New Black, 13 Reasons Why, Elite and Quicksand. Many detective shows routinely use flashback in the last act to reveal the culprit's plot, e.g. Murder, She Wrote, Banacek, Columbo.