A container is just a normal Linux process that the kernel has fenced off so it behaves as if it has the machine to itself. It sees its own filesystem, its own process tree, its own network interface, and a capped slice of CPU and memory, but it is still running directly on the host kernel. There is no second operating system inside it.
This is the key difference from a virtual machine. A VM runs a full guest OS on top of a hypervisor, so it carries its own kernel, system services, and gigabytes of disk. A container ships only the application and its dependencies, often 10 to 200 MB, and reuses the kernel already running on the host. That is why a container can start in under a second while a VM takes tens of seconds to boot.
A container starts from an image, which is a read-only, layered snapshot of a filesystem. The image is built once and runs the same way on a laptop, a CI server, or production. This is what people mean when they say containers solve the works on my machine problem.