The Algorithm is what is used to determine the rank of a website. It establishes a baseline and compares all web pages against this baseline. Each search engine has its own baseline determination factors.
For example, Google’s algorithm uses at least 200 factors to establish its own baseline. It is common knowledge that Goggle changes its algorithms weekly.
The method that SEO experts use to try and determine what factors Google and the other search engines will use is to research algorithm patents that the search engines have applied for.
Unfortunately for Google and fortunately for SEO experts, this information is public. Still, it is very difficult to determine all of the factors that the search engines believe are important to establish a baseline. Ironically, the bottom line is, you should design your website for people and not the search engines.
You will be rewarded by the search engines with higher rank if you please their customers, the searcher. In general, a truly relevant site with plenty of relevant content and incoming links will be mutually beneficial to you, your customer and the algorithms.
Writing for humans creates a true win-win-win.