As mentioned, we will need a Virtual Machine. We are going to use Oracle VM VirtualBox to host our VMs, which you can download at: https://www.virtualbox.org (I have downloaded the VirtualBox 5.1.12 platform package for Windows). Download the version that is applicable to you on the downloads page and install it on your computer. I've left all the defaults as they were, but you can change them as you see fit (at your own risk). If all goes well, you should soon see the Oracle VM VirtualBox Manager, as follows:
To create a new VM, click the New button. You then get to pick a name (I have called my VM CI server), a type (Linux), and a version (Ubuntu (64-bit), which is the default). The next window lets you specify the amount of memory. The default is 1 GB, but I recommend making that 4 GB (4096 MB), unless you are only going to run GitLab on it, in which case you can do with less. After that, you have to actually create the virtual HD. You can pick Create a virtual hard disk now (which is selected by default). The next two windows let you specify the type of file you wish to create and whether you would like to dynamically allocate space or have it fixed. I recommend leaving the defaults. After that, you get a summary and you can create your VM.
The VM is now added to the list of VMs in the VirtualBox Manager. You can start it by either double-clicking or by selecting it and clicking Start (don't do this just yet).