N'importe quoi is a very peculiar expression in French.
N'importe quoi = "anything"
The original meaning of n'importe quoi is "anything", but it's not the most common use of it.
(main meaning) N'importe quoi = "nonsense"
It is most commonly used to express a lack of understanding at a situation. It is actually closer to "nonsense".
It is a very difficult expression to translate to English, as it can be translated differently depending on the context.
Note that 'n'importe quoi' is a very common expression.
See also the related lesson: Autre chose / quelque chose d'autre = Something else (indefinite pronouns)