A supervision tree is a tree of processes. The upper processes (supervisors) in the tree monitor the lower processes (workers) in the tree and restart the lower processes if they fail. There are two types of supervision tree. You can see them in the following figure:
In one-for-one supervision, if a worker fails, it is restarted by the supervisor.
In one-for-all supervision, if any worker dies, then all the
worker processes are killed (by calling the
function in the appropriate callback module). Then all the
worker processes are restarted.