Go to the virtual machine's configuration > Hardware > Network > Source > Shared Network (Recommended) option should be set by default.
If you have already got a Shared network set but still experience network issues in Windows switch it to Bridged Network: Default Adapter and verify if the internet is working in any of these modes.
If the internet is accessible in one of the modes - either Shared or Bridged but having a different connection type set doesn't suit your needs, proceed to additional troubleshooting.