An algorithm is the set of steps that describes how a computer should process data in order to obtain a desired result. For machine learning, the algorithm tells the computer how to learn from data and produce a model that can then be used to make predictions on new data. In machine learning, the output of an algorithm is a machine learning model, which is a function (program) that can take input data and produce a prediction.