First, let us define quality links. In short, they are links that would naturally draw direct traffic. The so-called online experts will tell you that your links need to be relevant to your site, but they never go into details. What they really mean is that if a person was on a website and saw a link to your website, they would want to click the link to go to your website.
Here is an example of a relevant link
You run a website that sells shoelaces in all different colors, sizes and lengths. If a person were looking to buy some new shoes from a website, and they saw a pair of shoes that he/she liked, but the laces were the wrong color. In that situation a link from the shoe website to your website would probably gain his/her attention and he/she would probably click the link to see your website. This would be a relevant and high quality link.
It would be even better if the website were a popular one, and one that employs good SEO techniques, and not one that uses any form of Black-hat SEO.
1-High quality content that draws attention
Google and Bing are both looking for organic links. They prefer it when other people link to you of their own free will. This was the original motivation that made them recognize links as an index rating metric. They are now well aware that people manipulate links, so they do not consider links as much when they rank a website, but they are still important. If you are able to gain organic links, if you are able to get people to spontaneously link to you of their own free will, then your website will rise through the search engine results.
Sadly, high quality content alone is not enough to draw lots of attention to your website. For example, if you were to give a very large and accurate description of the mating habits of the Australian swan, then it not going to draw a lot of attention. However, if you were to promote your content to a number of respected ornithological experts and enthusiasts, there is a high chance that your content will be linked to organically.
Some high quality content has a very popular appeal. This is often content that is related to the news. Some people have done very well by researching a certain news issue very comprehensively, and then producing articles based upon their research. This gives people a website/web page that they can link to whenever they make a reference to the item in the news.
2-Articles and blog posts
This is an old tactic, but it still works. Some people use high quality content to earn affiliate money. They gain so much traffic, that people click their adverts and the person who posted the article is given a share of the money that the affiliate network pays.
The main use for guest blog posts and article sites is to increase the SEO of the website that it links to. They allow you to create online content and link it to your website. These links can be built so that they are relevant. You have to do this in two ways.
First, you must find a blog or an article site that is at least mildly related to your website. So, if your website sells shoe polish, then a fashion article website would still be relevant enough for you. Secondly, you can write your article or blog post so that it is relevant to your website. For example, if your website sold shoe polish, you could write about how it is made, how to use it correctly, or how it was invented, etc.
3-Pay for inclusion in authoritative directories
This can still be done online. You should not buy links (as a rule) but there are times when you can buy some very powerful links, and can do it without breaking any of the Google rules/guidelines. There are still paid directories online that Google accepts links from. These are often trade directories, and company directories, and some of them are quite well known. A link from one or more of them is a very quick way of generating quality backlinks.
You could be a little sneakier and offer to pay people to install links to your website. The trouble is that you cannot let Google know that you are doing it. This means you cannot advertise such a method on your website. You will have to contact people privately via email, social media private messages, phone, mail or in person. Once you have contacted them, you can politely offer them money to install your link. You can also offer to link to them in return for them linking to you, but that technique does not often work as well as offering money.