“That's not necessarily true.”
You're debating with your friend over weight loss methods. Your friend says that if you exercise 4 or 5 times per week, you'll definitely lose weight. You think that that's usually true, but you can also remember some examples of people you knew who exercised a lot but didn't lose weight, so you say this.
That's not necessarily true.
Use the phrase "not necessarily" to show that you don't think something is completely true, although it may be true in most cases or for most of the time. For example:
Larger fighters are not necessarily stronger.
... means that larger fighters are usually stronger, but sometimes they aren't.
When someone says something you don't think is completely correct, you can also just reply "Not necessarily":
A: It's always more expensive to fly on the weekend than on weekdays.
B: Not necessarily.
"Not necessarily" is a pretty safe and polite way to disagree with someone. People use this phrase when debating things at work, at school, when discussing politics with friends, and so on.