In mathematics and computer science world, an algorithm is a self-contained sequence of actions to be performed. Algorithms can perform calculation, data processing and automated reasoning tasks. An algorithm is an effective method that can be expressed within a finite amount of space and time and in a well-defined formal language for calculating a function.
You can refer to this link related to algorithm and data structure animations: https://www.cs.usfca.edu/~galles/visualization/Algorithms.html