The student or researcher then carries out the research necessary to answer the research question, whether this involves reading secondary sources over a few days for an undergraduate term paper or carrying out primary research over years for a major project.
When the research is complete and the researcher knows the (probable) answer to the research question, writing up can begin (as distinct from writing notes, which is a process that goes on through a research project).