We need to select an operating System(OS) to get a specific virtual machine (VM). VM provides fullOS to an application for running in a virtualized environment.
A Container uses the APIs of an operating System(OS) to provide a runtime environment to an application.
A Container is very lightweight in comparison with a VM.
VM provides a higher level of security compared to a Container.
AContainer just provides the APIs that are required by the application.