Never give up.
This is the piece of advice I've seen most often when it comes to writing, and I have to agree with it. We're going to be faced with lots of rejections from editors, publishers, and literary agents until we find the right one who decides to take a chance on our work. It only takes that one. We're going to face a lot of feedback, both positive and some even harshly negative.
Never give up in the face of it. We write because it is something we love to do, and even because it is something we have to do. We write because it inspires our emotions and creativity, and does the same in others. It makes us laugh, it makes us cry. It makes us angry, or leaves us breathless with anticipation. It even wakes us up in the middle of the night with an idea that just won't let go and we know we have to write out that story somehow.
Never give up, because this is what we were meant to do. Write, create, have fun, and love exploring the craft. Read, and learn, and write some more. Keep honing skills, and play. Persistence will pay off.