What's the difference between "неважно" and "ничего"?
As I understand both mean "never mind", but what about usage?
for example when I ask somebody but he/she can't understand me, can I use both of them as the response to interrupt the conversation?
Ничего is not translated to never mind, at least in the context you provided.
In your example,
When I ask somebody but he/she can't understand me
given two choices you reply with Неважно if the question was not really important. Alternatives to that can be Проехали or Забудь.
Let's take a look at another example: someone accidentally steps on your shoes. If the person excuses, you would reply with:
- Never mind.
- No problem.
- That's okay.
In Russian you would reply with:
- Ничего [страшного].
- Все хорошо/в порядке.
Context 1: the difference is not essential.
Что ты имел в виду? - Неважно.(- Забудь.)
What did you mean? - Never mind. (- Forget it.)
Что ты имел в виду? - Ничего.
What did you mean? - Nothing (special).
Context 2: the difference is dramatic (bad vs OK).
Как ты себя чувствуешь? - Неважно. (~ Плохо.)
How do you feel? - I don't feel good.
Как ты себя чувствуешь? - Ничего. (~ Неплохо.)
How do you feel? - I'm OK.