It depends on what your external networking infrastructure looks like. There's no single way. If you're talking about a home lab situation with a residential ISP, you usually have a single static IP and NAT that connection to multiple hosts on your LAN. Virtual machines are just another host on that LAN.