Using the Internal Networking mode
Suppose you need to test a new web application on a virtual machine, and you want to test it from another virtual machine, but you don't want it to be open to the other PCs on your LAN. The bridged networking mode will let you run a web server on a virtual machine, but it will be open to the other PCs on your LAN and to the Internet, in case you open up port 80 in your modem/router's firewall. This is where the internal networking mode comes into play: your virtual machines can communicate between each other, but you can't access them from your host PC or from another PC on your LAN! And they are isolated from the Internet, too!
This little magic trick has some requirements, though: you must enable a DHCP server to assign your virtual machines an IP address automatically each time you start them because they must not be on the same IP address range of your host PC or the other PCs on your LAN. Now let's see how to do that…