Algorithm

Algorithms are procedures that can be executed in the same way to solve a variety of problems arising from different situations and involving different numbers.

An algorithm must be sound and complete. That mean it must gives you the correct answer and it must works for all cases. Usually, an algorithm is predictable, deterministic, and not subject to chance.

Source:

National Research Council. (2001). Adding it up: Helping children learn mathematics (J. Kilpatrick, J. Swafford, & B. Findell Eds.). Washington, DC: National Academies Press.