This phrase can be used, for example, if someone has misunderstood what you were trying to tell them If you have tried it several times and don’t want to repeat it again, just say “(Oh) never mind.” And you can start talking about something else.
You can also use this phrase to mean “it doesn’t matter” or “forget it.” It’s good to say it with a slight smile and a positive tone of voice. If you say it with a dropping intonation and without a smile, then it means that you are all cranky, unhappy or annoyed about it.
A: Are you going to the butchers today?
B: No, I’m not. But why-do you need something?
A: Oh, never mind. It’s okay, I’ll go tomorrow.