What is the diffrence between return to flow and end of dialog

In the connection section of every node we can see "end of dialog also “return to flow” Whats the difference between them

Hi @agrawal.vedant ,
Thankyou for reaching out to the Kore.ai

Return to flow → mainly used to go back to the parent dialog after a sub-dialog completes.
The bot resumes where it left off in the main flow.

End of dialog → ends the current dialog completely.
The bot stops and waits for the new user input.