Generally speaking, an algorithm is a set process to solve a problem. Algorithms are all about finding solutions, and the faster and easier, the better. Search engines use them to gather information and determine what results to return for a search query.
When referring to search engines, you will usually read about “THE” algorithm. However, it is actually a set of algorithms that work together to determine how significant a website is for a specific search term or terms.
Think of it as a main algorithm and several sub-algorithms and formulas. The main algorithm is the one that determines how the others are considered to produce the results you see on a SERP when you search for something.
Each search engine has its own set of rules (algorithms and sub-algorithms). And they work together to “decide” what results we see when we look for something online.
These set of rules is also what determines whether a site is spam or not and if it as relevant and useful information for potential visitors. Algorithms also rank websites according to their content. This means that the order in which results are delivered is also determined by these. As search engines have evolved, algorithms have too. They work to present us with the most relevant results whenever we enter a search query and, as such, have changed technology advances.
A simple example of how algorithms work is mobile searches. Nowadays, a great deal of searches is done via mobile devices. So, given two sites that have the exact same content, an algorithm will present you those that are mobile-friendly before those that are not.
It is important to note that search engines are always looking to present users with the results that are closer to what they are looking for and those that offer a good user experience. That is what’s behind all the periodic updates and changes done to these formulas.