Another way of thinking about different types of sources is to think about them in terms of differing information needs - which might correspond to different stages of the research process.
At the opening stages of your research including as you are narrowing a topic and deciding on a research question, you may be using a lot of information sources, most of which will not wind up in the final product, whether that is an essay, research paper, poster, or whatnot. Much of this can be tertiary sources, that is, textbooks, websites, Wikipedia, other encyclopedia articles, social media channels like Twitter. This will help you establish a knowledge base about your topic and help gain an understanding of the vocabulary used to address the topic (and that you will use as keywords). These sources might lead you to research that you will address in the final product that you are working towards.
A few of the sources you use for background information might wind up in your final product as you establish the context of your research question. When you are establishing context, one of the things you are doing is establishing for readers why your research is important. Thus, this might involve pointing to items from the popular media to show that your topic is of current interest to society. This isn't an approach that everyone takes, and may not be appropriate to your discipline; while establishing context might draw on a couple of these more popular or general sources, it might well also stick to the established research literature. In this case, you will be establishing why your research question is important to your scholarly community rather than (or as well as) broader society.
When it comes to answering your research question, you will want to stick with secondary and primary sources: the data collected by scholars (which might be your own data) and the analysis that they conduct and then publish in the form of scholarly articles, books, book chapters and similar. Don't for get that if you are considering a question that is contentious or for which different people have different views, or where the established research is internally contradictory -- which is often the case! -- you should include these differing views as you answer your research question. This might take place in a literature review or a discussion section of the piece of writing you are working on.
Sometimes you might be writing for a different audience than just your lecturer. You might be asked to develop a poster or presentation for an audience of your student peers or one that addresses the broader public. In such a case, you might again broaden the sources you draw on to more popular sources, perhaps even from social media.
The Library proactively supports and enhances the learning, teaching, and research activities of the University. The Library acts as a catalyst for your success as University of Galway’s hub for scholarly information discovery, sharing, and publication.