The easiest way to setup a Windows Domain for testing or learning is to set it up in its own network outside the local network.
While it is possible to setup the Domain in the local network this would be considered multi-homed and a lot more difficult.
VirtualBox provides the Internal network (resembles a network switch) for just this scenario. You typically will have the Domain controller and at least one guest.
With these connected using the Internal adapter you do not get Internet access though and for that you need to setup an additional
guest to preform the routing. One approach is to use Windows XP and ICS (Internet Connection Sharing) which works or Linux pFsense which I prefer.
Either will do just pick the one that you are more familiar with. Below is a simple network diagram showing visually how to use VirtualBox
to achieve this.
The actual setup is of course outside the scope of this forum but the connection inside VirtualBox has been asked so many times
it makes sense that we provide a simple guide.