It means, before you begin, you want/need to have the ending of that in mind. For example: You're writing a story about a girl with cancer. You want to know the ending of that story before you can start it, like she dies at the end or beats cancer and falls in love with the guy.