There are many ways of creating a passive income online.
You can start a blog and write great helpful content and overtime you should get traffic and be able to make money through adsense or other ad networks or if/when you get enough traffic you can sell direct advertising and make even more money.
This won't happen overnight though unless you're one of the lucky ones and can promote like crazy. It can take years up to 5 years or more before your website is getting enough traffic to make enough income to live off of.
You can also sell ebooks or affiliate products on your website to earn money.