This is a question that the answer is way harder to find than it should be. With even Huffington Post not paying the bulk of their writers, it certainly seems to normalize the fact that you need to work for free before you get paid for your writing.
Turns out that's hogwash and lies. A quick gander around nearly any employment website shows dozens of "internships" and "opportunities" to write to build your portfolio and get exposure. They lead you into the belief that you need those articles before you'll ever get paid doing real writing. Or they'll engage in the insidious pay for views model which works in theory, but in practice there are so many factors outside of your control that it encourages weird behaviours for everyone.
All that is lies. And I know, I've done a lot of them. It turns out that nearly every magazine or other opportunity that will actually pay you to contribute to the, doesn't care about a lot of those "previous experiences" you have writing for free. A lot of the time those places that don't pay, they don't have very good reputations. If you're bylines include a bunch of blogs you're embarrassed that you wrote for, you can bet that it won't be better from the other side.
None of this is to say that there aren't times you shouldn't write for "free". I've done it and still do it. But there should not be the assumption that you have to earn to be paid for working. It is not some unreachable privilege to get paid for your work - it should be the assumption. And when you don't get paid in cash money for your work, you should know darn well what you are getting. Don't let them tell you its "exposure" or "experience" and its the end of the conversation. Are they linking back to you? Are they giving you credit? The number of people I know who have written amazing pieces for "exposure" only to not have their name put on the finished product is ludicrous.
And its almost never worth it in my experience. If they aren't willing to pay you, or give you something else in compensation, most editors and teams aren't really interested in helping you get better either. They've demonstrated what they think of you, and about content in general. Those places that don't pay also tend not to have great business plans. They don't have the money for the actual content for their website? How do they expect things to grow? For every Huffington Post and Medium out there, there are hundreds of blogs that apparently don't make enough to pay the writers.
So, the question remains, how do you write articles for pay anyways. The truth is, you've got to do your research and you've got to learn how to pitch. Its a unique skill that stands aside from the rest of your writing experience, and I'm no expert at it myself. I like to think that I'm still getting better and still figuring it out though. A lot of magazines and other organizations accept pitches from freelance writers. If you put together a great pitch, they aren't going to care if you aren't a super established writer. And that's what you've got to do. Put together great pitches. A lot of them will be ignored. So you're going to have to keep putting together great pitches and keep at it.
That will build you relationships with editors. Then they might start to contact you about stories that they want written. That's how you start getting assignments. By demonstrating that you're good at what you do, and building relationships with editors who understand and appreciate your style. It is a lot harder than responding to ads looking for writers, but no one ever said it was going to be easy.