There has to be some kind of benefit for the owner of the website to link to another website. You increase the chance of receiving free and spontaneous backlinks if you have a high quality site with excellent content.
Another benefit that you can provide to website owner is if you provide them with high quality content relevant to their niche. Any website owner is always on the lookout for a piece of content that is high quality and relevant to their niche and many would be prepared to allow you to place a backlink within the article in return.
This is known as guest posting or guest blogging, and is a fantastic opportunity to place quality backlinks on another site. As you create the high quality content for your guest posts to appear on their blogs, you are able to create the guest post links where you want to within the article and use the exact anchor text that best suits your needs.
Creating a resource or a resource page that offers valuable content to people within the target niche is another great way of receiving quality backlinks. The resource could be a tool (such as an interest calculator), an infographic, a video or just a really great blog post. The skyscraper technique is a great example of this, where you write blog posts that are an up-to-date epic piece on a relevant topic, so good that it encourages website owners to willingly link to it.
There are many link building opportunities and there are many link building techniques to collect high quality inbound links. But it's important to realise that gathering high quality links should be just one part of your overall online marketing strategy.