Algorithm vs. Function

Algorithm is a set of instructions. It is a series of steps (or process) for performing a calculation. 

Function is an implementation of one step of an algorithm. It is the mathematical relationship between inputs and outputs.