The ability of computer to understand human language (command) as spoken or written and to give a output by processing it, is called Natural Language Processing (NLP). It is component of Artificial Intelligence.
Collecting the information and understanding it, is called Natural Language Understanding (NLU).
Thinking of appropriate output, to feed the user is called Natural Language Generation (NLG).