This document compares virtual machines (VMs) and containers, explaining how each technology abstracts different levels of the application stack. VMs abstract the operating system from hardware, allowing multiple operating systems to run on the same physical server. Containers further abstract applications from the operating system, enabling multiple applications to run on a single operating system. While VMs provide hardware-level isolation and are battle-tested, containers offer more efficient application packaging and portability. The document concludes that VMs are best for long-running stateful applications due to security and isolation, while containers excel at short-running stateless applications due to agility.