There are white hat (ethical) and black hat (unethical) ways to secure backlinks, and you should be careful to avoid the latter because search engines can issue penalties against your website for link spam.
The only ethical way to secure backlinks is to publish great content on your site. Agencies will create infographics, produce videos, and write excellent articles that other websites will naturally choose to link to. These assets will centre on keyword research and competitive analysis.
After that, they’ll run content marketing and PR campaigns to promote your website’s new content. Making use of industry relationships, SEO agencies secure backlinks to your sites using guest posts or simply offering content in exchange for a link.