A search engine algorithm is the computer process applied to webpages in the search engine index to determine what are the more relevant pages and to assign ranks in the SERP.
A search engine algorithm can use several hundreds of elements relating to a webpage to determine its relevance score and its place in the results pages.
Understanding and knowing search engine algorithms (essentially the Google one) is the basis of SEO.
Each search engine has its own algorithm, but their operating modes and the different elements taken into account are usually nearly the same.
The main elements of a page taken into account by search engine are:
Structural elements (URL, domain name…)
Page title (tag title)
Highlighting elements and various html tags
Page and website popularity (backlinks)
Internal links structure
For more details, see Google’s algorithm.