Containers vs Virtual Machines

VMs virtualise hardware and each runs a full guest OS. Containers share the host kernel and isolate processes with namespaces and cgroups, so they start in milliseconds and are megabytes, not gigabytes.