So, with a VM everything inside it runs on a completely separate software stack completely different OS, Kernel, etc. It's very much pretending to be another machine.
With a container, it's running from the same kernel as the host, and the compartmentalisation is handled by the kernel basically. By default they can't really see each other, but the kernel can see both.