An algorithm is a step-by-step procedure or formula for solving a problem or completing a task. It consists of a finite set of well-defined instructions that can be followed to achieve a specific outcome, often implemented in computer programming. Algorithms are fundamental to computer science and are used in various applications, from sorting data to powering search engines. Their efficiency and effectiveness can significantly impact the performance of software and systems.