A simple example of the layered system (3 layers) where each higher layer can get one or other properties, methods from the near layer. The students and the principal only have to interact with one layer, the teachers, while the teachers have to interact with both of their adjacent layers, the principal and the students

Alternative view:

People in each layer can also interact with each other. A layer is a collection of components that work together toward a common purpose. If we add more layers, each layer would still communicate with its adjacent layers.
Usually, the inner or bottom layer provides services or abstractions for the layer outside or above it. For example, a higher layer may request information which the layer below it provides. A higher layer could also request an operation from the layer below. A lower layer could signal a layer above an event.
The interfaces provided by the components of layer should be well defined and driven by the needs of the system. Layering allows for separation of concerns into each of the layers. Many layered systems are split into presentation, logic, and data layers.
The operating system for a computer is a common example of a layered system:

- A kernel is the core of an operating system. One of its main responsibilities is interfacing with the hardware and allocating resources.
- System and Application libraries: the higher level functions that programs need to interface with the kernel. This could include functions for saving files or drawing graphics.
- Utilities and applications – Utilities are tools included with the operating system, such as command line programs, and those with graphical user interface like the file browser. Applications are additional programs, often installed by the user for specific purposes. Both utilities and applications rely on the layer below to use system resources.
The most obvious benefit of this layered structure is that users can perform complex tasks without understanding the layers below. In the same way, programmers can create applications that rely on the libraries layer without needing direct knowledge of the kernel. Another benefit of this structure is that the different layers can be run at different levels of authorization or privilege. The top layer is typically run in what is called the user space, which does not have the authority to allocate system resources or communicate with hardware directly. This so-called sandboxing improves the security and reliability of the kernel.
By using a layered architecture, your design will be more loosely coupled. Layered architecture follows the principle of least knowledge. Each layer only interacts directly with adjacent layers. Lower layers typically provide services to the layer above. So, if you do replace a layer, you only have to ensured that its interface with the layer above is consistent with the previous implementation.
The layered architecture can be relaxed by allowing for pass-through. This is often shown on the layered diagram as a notch in the layer:

However, this makes for tighter coupling in your software. The benefits of being convenient should be measured against the downsides, tighter coupling and a more complex structure.