An algorithm is a mathematical formula that the search engine uses to determine what websites to rank 1st. This is updated on a constant basis. An example of this is the Panda Algorithm Update which targeted websites that used low-quality content and reduced their website rankings.