A lambda is just a function without a name. (This feature tends to come with special syntax, although it doesn't have to.)
A nested function is a function defined inside another function which can access the variables of the enclosing function. (A nested function can be a lambda, but it doesn't have to be. Some languages have named nested functions. A lambda doesn't have to be a nested function; it doesn't have to pull in any variables from an outer scope.)
A closure is a nested function which can outlive the outer function, keeping its data alive. (A closure can be named, the usual case in Python and Javascript, or anonymous. So a closure need not be a lambda.)
Closures are easy to implement in garbage collected languages, but hard in explicitly allocated ones, because extending the lifetime of the imported data gets complicated.
So the options are:
- Lambda without any external data access -- typical use, comparison function for a sort.
- Lambda with external data access, but not outliving its enclosing function - typical use, iteration expression
- Named function with no external data access. Typical use, a local function in languages that don't do local functions well, such as C.
- Named function with external data access, not outliving its enclosing function. Typical use, internal function within a function to avoid passing extra parameters.
- Named function with external data access, outliving its enclosing function. A true closure, but not a lambda. Typical use, saving state for a callback in Javascript by passing the function to something that will save it and invoke it later. An object, really. This was how LISP did objects.
- Lambda function with external data access, outliving its enclosing function. A true closure. Same uses as above, but in different languages.
Most languages offer some subset of these six options.