How does the brain generate answers to questions?
The task you're referring to is called the Verbal Fluency Test. In "A Biologically Constrained Model of Semantic Memory Search" by Kajic et al. wherein a neural model of this task is described.

The model assumes words were previously encoded with relations between them according to lived experience. Consequently, the words are represented as N-dimensional vectors with relations between vectors constructed into a neural associative memory. As each word is selected from the question, a memory saves the words retrieved and uses those retrieved words to inhibit the memory so it doesn't repeat itself. This control flow is shown in the diagram below:



As shown in the paper, this approach matches human data pretty well, but only if you use word-associations taken from Free Association Norms.

Open research questions include where the word encodings came from in the first place and how to make this model match human data better.