Context in React creates a global state for a tree. It gives the ability to pass data from a parent component to child component without passing props between several layers in a tree.
Passing props from a parent component to child component via multiple components in-between is called prop drilling. Generally, this is an anti-pattern. In the following example, you can see that data is passed through several layers until its being used.