To start with, you have to make an observation. This is just finding something that draws your attention. The observation could be anything from the lines in a sedimentary rock to an inconsistency in two existing ideas.
Next, you form your question. This sound really easy, but the question has to be specific and testable. Really big questions have to be tackled through many little steps. "What is life?" is too vague to be testable, and the real problem is we only have one example of life (the Earth's biosphere), so there's just not enough data. What scientists could ask is "What are the unique characteristics of different organisms that separate them from non-living things?".
Then we have maybe the most important part, forming a hypothesis. A hypothesis is a kind of educated guess. The most important thing about a hypothesis is that it makes predictions. Any guess that doesn't make predictions is untestable, and therefore not science. A recent example of this was the Enceladus controversy. The hypothesis is that there is an ocean under the ice on Enceladus. One of the predictions from this is that there will be sodium in the plumes of water if there is an ocean.
The next step is to test your hypothesis. Carl Sagan said it well: "There are many hypotheses in science which are wrong. That's perfectly all right; they're the aperture to finding out what's right. Science is a self-correcting process. To be accepted, new ideas must survive the most rigorous standards of evidence and scrutiny."
Once you confirm your hypothesis, other scientists must confirm your results. If they can't, you have to figure out why you are getting different results. This step prevents people from making up research, and having it contaminate the body of knowledge science builds. If no one can replicate your work, it will eventually just be discarded.
If your idea passes all of these steps, it will start to be accepted by the scientific community. The more evidence for an idea there is, the more support it will have among scientists. This is where you would find theories like gravity, germ theory of disease, and evolution. Theories are not the same thing as hypotheses. Theories in science are well supported by a large body of evidence, but are not immune to change in the face of new evidence.
This is very basic overview of how science works. In practice, things are rarely this clean. The key to a scientific claim is making predictions, and finding the evidence. Everything else falls in place around that.