Monads are used in functional programming to build simple components. They are used to chain a series of operations in a safe way. Each component encapsulates a value and makes sure that the next component that is called could handle its output as input. For example, if component A generates nil (null) as output and the next component in the chain cannot handle nil as input, the computation of the chain will be stopped automatically.
In Haskell, a pure functional programming language, monads are used prominently. Still, they can be useful in other functional programming languages as well. We will take a brief and very high-level look at monads here and skip a lot of complex theory and background ...