A <u>twist ending</u> is an unexpected way to end a story. It is when the author adds a last event which is completely different from what the reader was led to expect.
A <u>realization</u> is when the character(s) get(s) an insight that helps them understand something. The consequences on the character(s) and their life are often of a limited scope or short-lived.
An <u>epiphany</u> is stronger than a realization. It involves feeling, it's not merely factual. What the character(s) discover(s) or learn(s) enlightens them and permanently changes their life.