The OS is usually constructed of several layers. The bottom layer directly interacts with the hardware, the next layer up interacts with that layer, and so on. Ideally, an application programmer does not need to know about the systems programs underneath an application program. But professional programmers must know what is going on in a computer system from bottom to top. Usually not thinking about the details, but the big picture is there.
Programmers shift their thinking to the level they are dealing with.