Scientific method refers to ways to investigate phenomena, get new knowledge, correct errors and mistakes, and test theories.

The Oxford English Dictionary says that scientific method is: "a method or procedure that has characterized natural science since the 17th century, consisting in systematic observation, measurement, and experiment, and the formulation, testing, and modification of hypotheses".

A scientist gathers empirical and measurable evidence, and uses sound reasoning. New knowledge often needs adjusting, or fitting into, previous knowledge.

Criterion 
What distinguishes a scientific method of inquiry is a question known as 'the criterion'. It is an answer to the question: is there a way to tell whether a concept or theory is science, as opposed to some other kind of knowledge or belief? There have been many ideas as to how it should be expressed. Logical positivists thought a theory was scientific if it could be verified; but Karl Popper thought this was a mistake. He thought a theory was not scientific unless there was some way it might be refuted. On the other hand, Paul Feyerabend thought there was no criterion. For him, "anything goes", or whatever works, works.

Scientists try to let reality speak for itself. They support a theory when its predictions are confirmed, and challenge it when its predictions prove false. Scientific researchers offer hypotheses as explanations of phenomena, and design experiments to test these hypotheses. Since big theories cannot be tested directly, it is done by testing predictions derived from the theory. These steps must be repeatable, to guard against mistake or confusion by any particular experimenter.

Scientific inquiry is generally intended to be as objective as possible. To reduce biased interpretations of results, scientists publish their work, and so share data and methods with other scientists.

Stages 
Science and things that are not science (such as pseudoscience) are often distinguished by whether they use the scientific method. One of the first people to create an outline of the steps in the scientific method was John Stuart Mill.

There is no one scientific method. Some fields of science are based on mathematical models, such as physics and climate science. Other fields, such as many fields of social science, have rough theories and rely more on patterns that emerge from their data. Sometimes scientists focus on testing and confirming hypotheses, but open-ended exploration is also important. Some scientific fields use laboratory experiments. Others collect observations from real-world situations. Many areas of science are quantitative, emphasizing numerical data and mathematical analysis. But some areas, especially in social science, use qualitative methods, such as interviews or detailed observations of human or animal behavior. Focusing too much one kind of method can lead us to ignore knowledge produced using other methods.

Some textbooks focus on a single, standard "scientific method." This idea of a single scientific method is largely based on experimental, hypothesis-testing, quantitative areas of science. It doesn't apply very well to other areas of science. It is often written as a number of steps:
 Ask a question about the world. All scientific work begins with having a question to ask or a problem to solve.I, p9 Sometimes just coming up with the right question is the hardest part for a scientist. The question should be answerable by means of an experiment.
 Create a hypothesis  one possible answer to the question. A hypothesis in science is a word meaning "An educated guess about how something works". It should be possible to prove it right or wrong. For example, a statement like "Blue is a better color than green" is not a scientific hypothesis. It cannot be proved right or wrong. "More people like the color blue than green" could be a scientific hypothesis, though, because one could ask many people whether they like blue more than green and come up with an answer one way or the other.
 Design an experiment. If the hypothesis is truly scientific, it should be possible to design an experiment to test it. An experiment should be able to tell the scientist if the hypothesis is wrong; it may not tell him or her if the hypothesis is right. In the example above, an experiment might involve asking many people what their favorite colors are. Making an experiment can be very difficult though. What if the key question to ask people is not what colors they like, but what colors they hate? How many people need to be asked? Are there ways of asking the question that could change the result in ways that were not expected? These are all the types of questions that scientists have to ask, before they make an experiment and do it. Usually scientists want to test only one thing at a time. To do this, they try to make every part of an experiment the same for everything, except for the thing they want to test.
 Experiment and collect the data. Here the scientist tries to run the experiment they have designed before. Sometimes the scientist gets new ideas as the experiment is going on. Sometimes it is difficult to know when an experiment is finally over. Sometimes experimenting will be very difficult. Some scientists spend most of their lives learning how to do good experiments.
 Why-questions. Explanations are answers to why-questions.II, p3
 Draw conclusions from the experiment. Sometimes results are not easy to understand. Sometimes the experiments themselves open up new questions. Sometimes results from an experiment can mean many different things. All of these need to be thought about carefully.
 Communicate them to others. A key element of science is sharing the results of experiments, so that other scientists can then use the knowledge themselves and all of science can benefit. Usually scientists do not trust a new claim unless other scientists have looked it over first to make sure it sounds like real science. This is called peer review ("peer" here means "other scientists"). Work that passes peer review is published in a scientific journal.

Although written as a list, scientists may go back and forth between different steps a number of times before being satisfied with the answer.

Not all scientists use the above "scientific method" in their day-to-day work. Sometimes the actual work of science looks nothing like the above.

Example: dissolving sugar in water 
Let's say we are going to find out the effect of temperature on the way sugar dissolves in a glass of water. Below is one way to do this, following the scientific method step by step.

Aim 
Does sugar dissolve faster in hot water or cold water? Does the temperature affect how fast the sugar dissolves? This is a question we might want to ask.

Planning the experiment 
One simple experiment would be to dissolve sugar in water of different temperatures and to keep track of how much time it takes for the sugar to dissolve. This would be a test of the idea that the rate of dissolving varies according to the kinetic energy of the solvent.

We want to make sure to use exactly the same amount of water in each trial, and exactly the same amount of sugar. We do this to make sure that the temperature alone causes the effect. It might be, for example, that the ratio of sugar to water is also a factor in the rate of dissolving. To be extra careful, we might also run the experiment so that the water temperature does not change during the experiment.

This is called "isolating a variable". This means that, of the factors which might have an effect, only one is being changed in the experiment.

Running the experiment 
We will do the experiment in three trials, which are exactly the same, except for the temperature of the water.
 We put exactly 25 grams of sugar into exactly 1 liter of water almost as cold as ice. We do not stir. We notice that it takes 30 minutes before all the sugar is dissolved.
 We put exactly 25 grams of sugar into exactly 1 liter of room temperature water (20 °C). We do not stir. We notice that it takes 15 minutes before all the sugar is dissolved.
 We put exactly 25 grams of sugar into exactly 1 liter of warm water (50 °C). We do not stir. We notice that it takes 4 minutes before all the sugar is dissolved.

Drawing conclusions 
One way that makes it easy to see results is to make a table of them, listing all of the things that changed each time we ran the experiment. Ours might look like this:

If every other part of the experiment was the same (we did not use more sugar one time than the other, we did not stir one time or the other, etc.), then this would be very good evidence that heat affects how fast sugar is dissolved.

We cannot know for sure, though, that there is not something else affecting it. An example of a hidden cause might be that sugar dissolves faster each time more sugar is dissolved into the same pot. This is probably not true, but if it were, it could make the results exactly the same: three trials, and the last one would be fastest. We have no reason to think that this is true at this time, but we might want to note it as another possible answer.

Replication crisis 
The replication crisis (or replicability crisis) refers to a crisis in science. Very often the result of a scientific experiment is difficult or impossible to replicate later, either by independent researchers or by the original researchers themselves. While the crisis has long-standing roots, the phrase was coined in the early 2010s as part of a growing awareness of the problem.

Since the reproducibility of experiments is an essential part of the scientific method, the inability to replicate studies has potentially grave consequences.

The replication crisis has been particularly widely discussed in the field of psychology (and in particular, social psychology) and in medicine, where a number of efforts have been made to re-investigate classic results, and to attempt to determine both the validity of the results, and, if invalid, the reasons for the failure of replication.

Recent discussions have made this problem better known.

Historical aspects 
Elements of scientific method were worked out by some early students of nature.
 "We consider it a good principle to explain the phenomena by the simplest hypothesis possible." Ptolemy (85165 AD). This is an early example of what we call Occam's razor.
 Ibn al-Haytham (Alhazen) (965–1039), Robert Grosseteste (1175–1253) and Roger Bacon (1214–1294), all made some progress in developing scientific method.
 Scientists in the 17th century started agreeing that the experimental method is the main way to find the truth. This was done in western Europe by men like Galileo, Kepler, Hooke, Boyle, Halley and Newton. At the same time, the microscope and the telescope were invented (in Holland), and the Royal Society was formed. Instruments, societies, and publishing all helped science greatly.

Related pages 
 Falsifiability
 History of science
 Philosophy of science
 Metaphilosophy
 Blind experiment

References

Other websites 
 Scientific method - Citizendium
 "How Do We Know What Is True?" (animated video; 2:52)
Philosophy of science