If you have zero experience in writing professionally, it will be hard for you to start earning right away.
Writing in general and writing an optimized article are completely different things. But there is no need to be disheartened, there are plenty of opportunities to get started.
The first thing is to find a niche that you like - it can be anything from travelling, music, programming or just general pop-culture.
Then you need to find a professional blogger to 'exploit' you. By exploit, I mean pay you peanuts for articles that take days to finish and weeks to get published. Again, the key is to stick to it - the feedback from the professional will help you hone your skills.
After a few months or years depending on your learning speed, you can be good enough to start your own blog.
I'm assuming there are a lot of programmers reading this, so if you are looking for freelance work writing and editing technical programming articles, you can comment below and I promise to send you our technical content writing guidelines for the programming blog I run that gets 5 million visits per month.