it's a bit obvious, don't you think?But a supermarket is a place that sells food. A shopping mall, however, consists of a variety of shops all in the one big building.
Colloquially you can use either, but if you were to say 'in the mall' you would likely be referring to an object. There's a bookstore in the mall. If you said 'at the mall', you would presumably be...