A simple introduction to networking, ip addresses, and virtual networks.
A network is a group of computers connected up so they can talk to each other using these ip addresses. Computers talk to each network they are connected to through an interface; it is this interface which is assigned the ip address. We normally use ip addresses to identify computers on a network. For instance, for a computer with ethernet and wifi, there is one interface attached to the ethernet and another to the wifi, and each is assigned an ip address from the corresponding network. We can tell the difference between ip addresses belonging to two different networks because they start with different numbers (the subnet).
Processes running can look for all interfaces that they have access to. A process can then choose to bind a port on the ip address for that interface. We can communicate with a process by knowing the ip address and port that it is listening on. The special loopback interface is part of a network which only our computer is a part of. This way processes running on the same computer can open ports on the loopback ip address so that they can always be found by each other predictably.
Although we are used to interfaces being connected to physical networks where the data is transferred using wires and waves, we can also create virtual networks that are completely software based. All we need is that there are processes speaking and listening on different ip addresses connected to the network. Of course, if the processes are on different computers, and each is connected to the virtual network through a different virtual interface, then we need some clever software rules to direct traffic to and from a virtual interface ip address through the interface connected to the physical network on the same computer, because the data must flow somehow through something physical in the end.
This means that we can effectively associate an ip address with a process or a group of processes that open ports on the address. Any other process that is on a network routable to this ip address (the network can figure out how to connect to the ip address through any intermediate networks or computers), can then talk to the former processes through the ports.
Virtual networks are neat because they let us create networks in nothing but software, and then we get all the benefits of a separate physical network: modularization and management; and routing, efficiency, and security. In addition, virtual networks allow us to create logical networks that span multiple physical networks, even across different locations and datacenters.