1. Make sure your writing deserves publication. This is an on-the-job training field. You grow as you write and publish more. Join an editing group. Pay a professional critique service to read and assess your material. Some material just isn’t publishable no matter how hard you choose to work at it.
2. Resist the temptation to ask editors for a critique. Most editors don’t have time. If you interrupt their work, they’re likely to remember you—and turn down anything you send. Don’t call editors and demand to know why they rejected your manuscript. (Yes, a few writers do such things, but some drivers text while they're in traffic.)
3. Be patient. Persist. Those who succeed in the writing business are those who keep at it for years, despite rejections and setbacks. Keep writing—and keep trying to improve. Read books about writing. Attend writers’ conferences. I know stories of people who went four years or longer before getting an acceptance. But in the meantime, they learned.
4. If an editor rejects the material but says positive or encouraging things, send that editor something else. If he/she says the piece came close, consider rewriting it and sending in the rewrite.
Rejections are part of the business of writing, but they're only part of the business.