Wikipedia gives this definition:
An algorithm is a finite sequence of well-defined, computer-implementable instructions, typically to solve a class of problems or to perform a computation.
An algorithm, literally, is a method for computing by which a desired result of a computation can be achieved. Currently, the widely accepted professional definition of an algorithm is: an algorithm is a set of feasible, deterministic, and finite rules for model analysis. In layman's terms, an algorithm can also be understood as a problem-solving step, consisting of some basic operations and a prescribed sequence. But from the point of view of computer programming, the algorithm consists of a series of instructions to solve the problem and can obtain effective output results in a limited time according to the normative input. Algorithms represent a strategic mechanism for describing problem solving in a systematic way.