What is the point of concealer?

I have a confession. I have no idea what concealer is for. How is it different than foundation? I have seen people use it in exactly the same way as foundation which adds to my confusion.

What is the point? Or is it just a scheme by big beauty to get me to buy more makeup?