There are two types/ methods of ranking your website On-page Search Engine Optimization and off -page Search Engine Optimization, but most people focus on off-pages Search Engine Optimization, yet the key point is partly decided by on-page factors. On-page SEO factors are all those tricks and techniques done from main website that can influence from within your actual website. These factors include; the quality of your code, site speed and content-related aspects, like the structure of your website or the copy on your website.
In addition to on-page SEO factors, there are factors which include links from other websites, social media attention, and other marketing activities outside your own website. They can be rather difficult to influence. As it counts from the number and quality of links pointing towards your site. The more quality, relevant sites that link to your website, the higher your position in Google, Yahoo, Bing and Yandex.