What I mean by research is all the steps you need to do when working on a specific project, meaning that you have a question which you're trying to answer using the resources available to you. So a typical homework is not considered as research. A homework is a set of problems which you are supposed to solve after learning about a certain scientific topic at school. This is not research, because you already know which topic this problem belongs to, it's enough to study that specific topic, or if you are an A-student, you could go beyond the points covered in class in your free time. But in any case, you know exactly what to look for.
Doing research for the first time is bumpy. You have no idea how to start, which points you should be focusing on, and which material you should use, and most importantly, how to finish on time. Research in Astronomy is the art of knowing which areas of Math or Physics you should be revising or learning for the first time.
I must say, you need some time before mastering research techniques, and eventually scientific writing. But that's another topic. Let's stick here to doing research the "right" way, focusing on the field of Physics and Astronomy. First, you have to know which resources are accessible to you in your institution or place of work: data, software, labs..
Second, what tools should you be using to analyze and process your data. I would suppose that you speak at least one programming language, my favorite is Python, it is becoming widely used within the Astronomical society, especially among young junior researchers.
Third, how to approach the problem. Well, first you have to read a bit about the topic, but here is where you probably need help. If you are a perfectionist like me, you would have the urge to know everything about the topic before jumping into the analysis, you would be tempted to know the whole theory thinking that this can help converge faster to the solution of your problem. I used to do that, but it is time consuming, and it will most probably leave you frustrated after knowing that you just cannot embrace all the theory in the time frame given to you. I would recommend doing the following: just read randomly about the topic in different journals or books or even dissertations. Don't read in a structured way, you have to collect the "broad knowledge" and especially what approaches others do to tackle it. Then little by little you target specific points and focus on specific ideas, of course you should be checking your data and doing some analysis tests along the way. You want to find the right questions, and that depends on the data you have in hand.
For example, my current post doc position is directed more towards image processing and optical engineering than doing basic science. I am analyzing calibration data for a space mission which promises new era of Solar Physics Research. And for those interested in the data products of such missions, images need to be cleaned up for any optical imperfection. (Side-note: I find this kind of research more appealing, since it is predefined what you have to get: people might be relying on you to find the platescale of an image or the modulation transfer function of the telescope for example, there are no open questions or gazillion theory on how to do it, it is straightforward, you have to get a number at the end and there are no speculations around it, it is either the right or the wrong number). Anyway, since there is little resources on image processing in Astrophysics (except for those working in Astrometry), I am reading publications in medical imaging and industrial machine vision journals. And that is totally O.K.
If you are doing research in a new topic, or you have a new method that you are trying to learn, be it in image processing, or coding, or just a theoretical idea that is essential to understand in order to carry on with your analysis, you will find yourself unfamiliar with some scientific principles, and once you start digging, you will be sucked into a blackhole of information to learn (what people call the wiki rabbit hole). But thinking about the problem every day and consistently researching it will help you clear any difficulty. Once you experiment enough with your data and keep reading, you will find yourself comfortable with any complication that might arise.
And don't forget to discuss with others, no matter at which stage your research is. When I first started my PhD I considered asking questions a sign of ignorance and laziness, well of course it is if done more than necessary, after all the point of being a researcher is doing it yourself! but discussing will save a lot of time and frustration.
Discuss with your colleagues or your supervisor, or the researchers in your group. When you talk about your problem out loud and explain it to others, not only it shows how well you understand your problem, but you could get different perspectives, get asked questions which might direct you to the right way. It often happens that we are focused on solving a complication following a certain line of reasoning and unable to think of it from different perspectives. Discuss.