To understand containers, you first have to understand virtual machines.
Virtual Infrastructure will typically look something like this:

For each VM, an application would be isolated or running on that specific virtual machine. A virtual machine will abstract the physical hardware / software capabilities of the system it is running on. It will then use that resource to create many resources.
Containers look similar:

With containers, you end up virtualizing the underlying OS. Crazy!! Like VM’s, containers are essentially their own isolated machine but much more lightweight and efficient. Where a VM will run its own kernel on top of the kernel of the OS that it is hosted on, a container will virtualize the OS so it does not need to have its own kernel running (The host OS is the only actual kernel running). It is almost like a microcomputer that has its own OS, CPU, Memory, and Networking capabilities. This feeds into the reason why they are so lightweight, containers don’t need to spin up their own kernel to work.
Aside: You can only install windows based containers on windows based systems. Same thing for Linux because containers will share the underlying OS/Kernel.
This is an extremely high-level overview of containers. There is so much more I’ve yet to learn, but this is just the beginning of my understanding.