I understand the function of each layer in OSI model but I can not comprehend the inner working at the operating system level. I can't mentally picture the life cycle of data from application layer to physical layer.
There is no specific "operating system level" in the OSI model. Most commonly, layers 3 and 4 are covered by the OS, but that may vary: functions are offloaded to the NIC (traditionally responsible for layers 1 and 2 only) and augmented by additional protocol handlers.
How the layers interact and work together is well covered in this question and answer.