When you asked something to Google Assistant, the words or sentences spoken by you is taken as input from your microphone then the Google Assistant recognize your speech and understand it (NLU) then it thinks for a answer (NLG) and after it gives you most relevant ones (output) for your queries !