Understanding CACHE

In a world where websites need to be fast and everyone shouts to optimize everything, there is one thing which is always mentioned: “cache”. But what is it, how does it work and which layers of cache are there?