A precise definition
An algorithm is a finite sequence of unambiguous steps that solves a problem. Sequence, selection and iteration are enough to build almost any of them.
Comparing two that do the same job
Linear search checks every item; binary search halves the list each time but needs it sorted. On a million items that is a million checks versus about twenty.
Ranking feeds
A recommendation system scores each post against signals — recency, engagement, similarity to what you watched. 'The algorithm' is a scoring rule, written by people who chose those signals.

