The answer is the device driver, after a network protocol has configured a message correctly it hands the data off to the NIC driver for broadcast onto the network. NIC drivers receive data from protocols and then forward this data to the physical NIC which transmits data onto the medium. The reverse is also true when data arrives at the NIC from the medium the NIC hands it off to the NIC river which then hands it off to network protocols. Every NIC card installed in a computer must have an associated device driver installed in the OS. The device driver software achieves the information of communicating with the NIC hardware to send and receive data to and from network media.