"An Occurrence at Owl Creek Bridge" is an 1890 short story by Ambrose Bierce, and is one of the most famous examples of a "twist ending" in literature.
The entire story is told in third-person, omnipotent narration; that is, there is an unseen narrator who can see and comprehend all events. Third-person narration is distinguished from first- or second-person narration because it does not use either the personal pronoun; the narrator is not "I" or "You, as it would be in those two styles, but instead has no specified form. The effect is as if the reader is watching the events unfold, with some commentary to explain them. Third-person narration is popular in fiction, since it allows the writer to shift from character-to-character, and scene-to-scene, without losing the reader's attention.
Towards the end of the story, the narration shifts from past-tense -- "was" -- to present-tense -- "is."
His neck was in pain and lifting his hand to it found it horribly swollen.
All is as he left it, and all bright and beautiful in the morning sunshine. He must have traveled the entire night. As he pushes open the gate and passes up the wide white walk, he sees a flutter of female garments; his wife, looking fresh and cool and sweet, steps down from the veranda to meet him.
(Bierce, "An Occurrence at Owl Creek Bridge," eNotes eText)
The text shifts back as the story ends, lending a finality to the shock of the ending. The choice to switch tense is purely stylistic and has little bearing on the narration, but it is important in the context of the story; the difference between "what is" and "what might have been." The effect is enhanced by the simple, barely explained final sentence, which gives new meaning to the preceding sequence.