The OSI reference model has 7 layers - physical, data link, network, transport, session, presentation and application layer. Each layer has a specific function like the physical layer deals with transmission of raw bits over a communication channel, the data link layer handles error checking and frame delimiting, the network layer handles logical addressing and routing, the transport layer handles flow control and error checking, the session layer establishes and manages communication sessions, the presentation layer handles syntax and semantics of the information and the application layer supports applications and end-user processes. Data flows from the application layer downwards to the physical layer for transmission.