Containers (Docker) virtualize at the OS level: they share the host kernel, start quickly, and are lightweight. Virtual machines virtualize hardware: each VM runs its own guest OS/kernel, is heavier and slower to start, but provides stronger isolation.