Neither would be incorrect.
A textbook might say that the key determiner is whether or not the mall has been mentioned before, but I’d say it’s more about how many malls are in the town where we live, whether it’s obvious which one we are going to, and whether it even matters to the person being addressed.
Here’s a situation where I would use a:
- I am person A, B is a good friend of mine, and C is in the car with us. C happens to be my girlfriend, and she’s told me she wants to buy a new necklace before we go the party we all plan to attend. B notices we are driving away from the party, and he says:
B: Hey, where are we going? The party is that way.
A: To a mall. C needs a necklace, remember?
B: Oh, yeah, I forgot.
In that case, B doesn’t really care what mall we are going to; B was just trying to figure out why I was driving the wrong way. Therefore, while the definite article would also have been correct, the indefinite article works just fine, too.
However, if I live in a rural town, and there is only one mall within 50 kilometers, and B and I go to that mall often, I’d be more likely to say:
A: To the mall. We need to get C a necklace.
even if we never had the prior conversation before leaving the house. We don’t need to mention the mall before calling it “the mall,” because everyone correctly assumes what mall we mean when someone says “the mall” when they are driving around in our little town – the only one within 50 kilometers.