This shows when the king locked her up to spin gold for the him.
This shows when she was confused on what to do, when her father boasted about how she could spin gold, and she couldn't, or didn't know how. Then the dwarf showed up.
She asked the dwarf if he could spin some gold for her. He said only if she gave him the fist child she gave birth to.
When the baby is born, and she forgets about the promise she made to the dwarf. The dwarf knew she had had the baby, so he visited her. He said that she could keep her baby, if she found out his name.
The dwarf shouted out his name, and the girl heard it. Then she said,"Could your name be Rumpelstiltskin?"She was right.
She got to keep her baby and live a happy life with her new family. She didn't have to worry about her father boasting ever again!