networking – How does a Virtual Network Interface work?

I am studying the concept of containers at the moment. I have got a good grasp of how hardware virtualization enables virtual machines to divide and isolate hardware resources among several VMs and how virtual networking enables computers connected to different network switches to behave as if they’re all connected to the same one, and, conversely, computers that share cabling can be kept on separate networks, rather than physically connecting machines using cabling equipment and hardware. My question is about Virtual Network Interfaces (VIFs). In fact, a virtual switch connects to a VM via a VIF and connects to a physical ethernet switch via a physical NIC. I would love to know how does the virtual switch makes use of the physical NIC to create several Virtual Network Interfaces? Who is in charge of scheduling, queuing and relaying actual packets between VIFs (VMs respectively) and the physical devices?