What’s likely happened is that Windows is using your second output as an extended display. This means that you can drag windows (e.g. web browser) off the right-hand side of the first screen to appear on the second screen. What Windows doesn’t realise is that both are connected to the same monitor.
You can configure the screens as follows with two screens connected (one to VGA and other to DVI) and both switched on: Right-click on the desktop and select ‘Properties’. Go into the “Settings” tab. From here, you can choose what screen to be your primary screen (i.e. the one with the start menu, taskbar & desktop icons) or whether to have them cloned, i.e. both screens show the same thing.
If you just want to use the DVI output, first power down your PC, disconnect the VGA cable and boot the PC back up. When the graphics card detects that the VGA is not connected during boot, it will use the DVI output as the main display for everything.