Almost all writers have received those dreaded rejection letters from publishers or agents. It just goes with the territory.
There are levels of rejections, and you may find that you progress up these levels on the ladder to getting published.
The most common type - and the lowest level - are form letters. Something generic like: "Thank you for submitting your manuscript to us, but it is not right for us." There will be a scribbled illegible squiggle of a signature, with no real name printed.
You then hopefully progress to personalised rejections. You might get something like: "Thank you for submitting your manuscript to us. While I enjoyed reading it, I felt that it was not strong enough a story for us to be able to publish it." This one will have a real person's name and signature on it.
Now! That's success of a type. Your manuscript was good enough to merit a) a personal response from the literary agent or publisher, and b) an indication of what's wrong with it. That's very, very valuable information.
Before you send your manuscript out again, have another read of it and see how you can make it stronger. Now, I know that's difficult. What exactly does stronger mean in this context? Only the agent or publisher herself knows what she meant by it - and no, you cannot ask her for clarification, tempting though it is. But it will be a good discipline to see if you can make your novel stronger in all aspects: story, characterization, writing and so on.
The more specific the feedback you get the better. This is for two reasons: more specific feedback helps you fix what's wrong, and also it means you're near to having something publishable for them to take the trouble to write in such detail.
So, if you get a rejection which says something like: "... I really enjoyed reading it and got very caught up in the story. However, I couldn't relate to Marjorie and somehow didn't understand her motivation. I also found the ending to be somewhat weak", then you're really near success.
You do have to make Marjorie easier to relate to, and make her motivation crystal clear, and give a stronger ending. But at least you know to do that now.
Not all rejection letters agree, mind. Another might say, "I loved Marjorie! What a great character," and have some other issues with the manuscript.
What do you do then?
That's a judgement call. On the one hand there's no harm in making sure that Marjorie is both very easy to relate to, and that you make her motivation strong without being patronising to the reader. But on the other hand you can't please all the people all the time, and should maybe go with the consensus opinions.
The Best Rejection Letter of All
The best kind of rejection letter of all is something like: "... so for those reasons it's not for us. However, I'd be delighted to read any other work you might have, now or in the future". That means you're so, so close. And with your next project (assuming you didn't end up placing the first one elsewhere), you can remind them of this in your next query letter to them.
If, however, you find that you're not progressing beyond the form rejection letters, then I recommend that you revisit your story completely. I know this is difficult - but those form letters have their own message to you, and it's that your story is nowhere near being publishable. One suggestion would be to get a detailed and informative professional critique, which would do for you what the publishers/agents can't do - give you detail on what's wrong.
It is very possible that you might have to abandon that story altogether and take what you've learned and apply it to a new story. Not easy, for sure, but there is no shame in having had to learn your craft by your mistakes.