OSI model, communication between same layers but on different machines

Hi friends,
I hope everyone is doing fine. I have this confusion regarding the OSI model. I have been reading a book on datacommunication and networking which discusses the OSI model in great detail. One thing that I can't figure out is the OSI daigram in this book. It shows communication between the upper and lower levels, but it also indicates diagramatically that same layers on two different machines are peers, and communicate with each other directly. I thought that if machine A want to communicate with machine B, it has to transfer the data downwards to its own physical layer, from where it can travel upwards to the upper layers of machine B. I can't understand the concept of same layers on two different machines communicating with each other directly. I hope you will help me understand it.

Looking forward to your wonderful and helpful replies.
Thanks in advance!

Each layer passes down/up to the next layer for that layer to add/remove its wrappings, but those wrappings are the communication between equivalent layers, eg. When Apache's MIME headers are read by your browser even though it is mediated by the intervening layers, the Application layer of the server and of your browser are in direct communication.