Scientists use the Scientific Method as a systematic approach to discovery. First, a tentative explanation is made to explain some phenomenon, this is called the hypothesis. Second, the hypothesis must be tested by the process we call experimentation. Simplicity is important to try and avoid influences of variables.
If the results of the experiment support the original hypothesis, then it is accepted as true. If not, then the hypothesis is rejected.
If other researchers can duplicate the results of the experiment, then the hypothesis is widely accepted. A hypothesis that has gained high levels of confidence is considered a law or theory.
A hypothesis is an explanation for an observed phenomenon. A hypothesis is tested and then either proven or disproven. This is done by conducting an experiment. This is where the variables come in.
Independent variables and dependent variables allow the experimenter to have control over the experiment. Results are measured (quantitatively) and you are able to discover whether your hypothesis was proven or not.
An independent variable is what the experimenter changes in the experiment. This is necessary to perform the experiment. The dependent variable is dependent on the independent variable. In other words, it may change when the independent variable changes.
The difference between a hypothesis and an experiment is that an experiment is a way to test a hypothesis. A hypothesis is a prediction. You predict that if you change one thing (the independent variable) the other thing (the dependent variable) will change. Then you do the experiment to find out if your hypothesis was right.
Here's an example:
Let's say that you think that something that is heavier will fall faster than something that is lighter. That's your hypothesis -- if we increase the weight of the object, it will fall faster.
The weight is the independent variable. The speed that it falls is the dependent variable. You are trying to test what impact the independent variable has on the dependent variable.
A hypothesis can be likened to an educated guess of what's going to happen based on previous knowledge of the scientific principles at hand. An experiment tests out this hypothesis.
Independent variables are what you change. Dependent variables are what you measure.
If we were to conduct an experiment to test the relationship between temperature and density, we'd calculate the density of some test object in different temperature environments. In this case, temperature is the independent variable that we're manipulating. Density is the dependent variable that depends on the temperature and we are measuring it.