The ending is where the characters resolve conflict. It's important to create endings that link back to the beginning of the story and tie up any loose ends.
There are many different ways you can resolve your story's conflict. The most common way is to have the characters overcome the obstacle that is in their way.
A perfect ending is planned, ties up loose ends, and links back to the beginning of the story. Writers can tie beginnings and endings together by repeating important words or phrases or by posing a question and answering it.