This blog post explains it well:
https://cosmicbyt.es/posts/demistifying-containers-part-1/
Essentially, containers are means of creating environments in which you can run software, and those environments are:
- isolated, which makes it a very controlled environment. Much harder to run into errors
- reproducible: we have tools that reproduce the same container from an image file
- easy to distribute: just have the container image.
- little to no compromises on performance (at least on Linux)
It is essentially a way for you to run a program without having to worry how to set up the environment, why it didn't work as expected, what dependencies you're missing, etc.