In an extremely broad sense, an algorithm is a set of instructions that we, the programmer, define the computer to do. This algorithm would take in an input, and do the same set of instructions to it. We use algorithms to solve problems, because many problems can be solved by doing a set of steps.
There are many types of algorithms, including but not limited to: sorting algorithms, search algorithms, pathfinding algorithms, and hashing algorithms.
1.1 What is a data structure?