This phrase means "it doesn't mean that..." or "it's not true that...". You use it to say that something people might think is not actually correct.
、。
I like cooking, but that doesn't mean I cook every day.
に、。
Just because I passed the exam, it didn't mean that everything was over.
に、。
It's not that I don't want to go to the party, it's just that I'm a little tired.
、。
It's not that I can't eat any sweets at all, but I've been cutting back recently.
、。
Just because he's the company president doesn't mean his decision is absolute.