Scientists try to solve problems or questions in a logical manner using the scientific method of problem-solving.
Once a well-thought out question has been asked, a possible answer to that question or hypothesis is put forth and later tested. In scientific research, an experiment is conducted.
In an experiment, there must be two groups. One is called the experimental group and the other is called the control group. The only difference between the two groups is that the experimental group gets the variable being tested while the control group does not. All other variables are kept constant.
In a practical example--one could pose a question--will plants grow taller with fertilizer? A possible hypothesis is --if given fertilizer, plants will grow taller.
To test this hypothesis, you will need an experimental group which will be given fertilizer and a control group which will not get fertilizer. However, the type of plants, amount of soil, amount of water, sun exposure, container to grow plants, will all be kept constant. These are variables that must be the same in each group. The fertilizer is the independent variable being tested by the researcher and only the experimental group will receive it. The control group will not. The dependent variable in this case is plant growth which can be measured as height and kept in a data table.
At the end of the experiment, the height of the experimental and control group plants will be measured. If the fertilizer helped the experimental group grow taller than the plants in the control group, the hypothesis is accepted. If there is no difference, or if the experimental group is smaller than the control group, the hypothesis is rejected.
To summarize, variables are all the factors that must be kept constant in an experiment except for the independent variable that the researcher is testing in the experimental group. The control group does not receive the independent variable. By having an experimental and control group, the researcher can compare results to see if a hypothesis is valid or invalid.