Research will fit together with your writing in two ways: you will use research to find the place your work begins (a process described in the question about how to select a topic) and then you will use research to help you develop your arguments. When you begin to investigate a topic for your paper, you will search existing literature ("literature" is used here to mean the body of research you find on that topic) to "see what's out there." Your purpose is to see what has been examined and what has not, what has been explained or critiqued and what has not. You want to eavesdrop on the conversation scholars are having about the topic to discover what has been studied and what has been concluded as well as what has not been studied or considered.
That conversation is made up of all the research articles written about the topic. When one scholar writes about a topic, another scholar may read that piece and come up with another idea connected to it. Sometimes the second scholar finds fault with the first piece or with the research behind it. Sometimes the second scholar expands the first piece. At any rate, the second scholar responds in some way to the first idea; then a third scholar and a fourth respond to those ideas. The first scholar may well reenter the conversation by writing in response to any of the other contributors. Before long, a "body of literature" has been written about a particular topic.
When you begin working on your topic, your objective is to locate that body of literature; eventually, you will be a contributor to it with your writing. (If you write an excellent paper, you should present it at a conference or submit it to a journal for publication.) Your research paper will constitute a segment of that conversation among scholars. In order to enter the conversation fully, you will need to know the boundaries of the discussion. For that reason, you will look for the central points of the body of literature, the developing divergent pathways from the center, and the limits or edges of the topic.
To find those dimensions of the body of literature, you need to spend time in the library rummaging through every journal you can find you believe will include relevant information. (For most topics, you will be searching academic journals rather than popular periodicals. Academic journals publish research that has been scrutinized by other researchers; popular periodicals publish articles that will sell those magazines to general readers. The criteria for publication in either of these sources differs significantly and the kind of information you find differs as well.) Look in your textbook bibliography to help you find an author or an article or a word to get the search started. Think creatively to find words to use in your computer search and to think of sources you might consult. Pursue words or phrases you find in titles of articles. When you locate an author, check other articles by the same author to see if that author wrote about the topic in some other source. Use various data bases to be sure you have covered every possible source.
Once you locate a few central articles--research you believe to be at the center of the topic you have chosen--retrieve those articles and scour their bibliographies. Find other sources in the bibliographies you think might give you more information. When you retrieve those sources, use their bibliographies in the same way. Keep collecting articles that focus on your topic. As you collect, narrow your topic. Set aside articles that relate to your topic but do not provide information directly applicable to it. Focus on those few articles that directly address your topic.
When you believe you have recovered most or all of the material available on this topic, organize your material into usable categories and read it thoroughly. (One good plan is to create a system on your computer to keep track of sources and page numbers so you can type up notes from the readings as you study the works.) Continue to weed out material that is not germane to your topic. When you finish the reading, you are ready to enter the scholarly conversation about this topic with your own writing and your own ideas. Your investigation into the scholars' conversation will inform you and guide you, but it does not need to dictate what you decide to write.
At this point, you can begin to formulate a shape for the paper you are about to write. If you have maintained a course in the direction of the assignment, you are ready to move to a new part of the writing process. For example, if you were asked to critique research, you now will have gathered all the critiques of that research or critiques of the kind you are to write. If you were asked to compare and contrast, you now have gathered all the examples of comparative or contrasting perspectives. If you were asked to review the literature, you have collected the relevant works and now will begin to organize them.