Rejection hurts, no matter what the reason. The only good part of being rejected is when an editor sends you a personal note. You can use their comments to improve your query before targeting other publications with your idea. Also, if an editor liked your query enough to send a personal note, you have a good chance of getting your foot in the door at their office at a later time. Query them again.
Many writers joke that their offices are wallpapered with rejection letters.
If you are persistent, you will become a published writer. The editor will contact you by mail, phone, or e-mail and will tell you to proceed. They might discuss your idea and tell you how they'd like you to write the article differently than your query angle. They should also provide you with a word count and a deadline. They might send you a contract, but this doesn't always happen.