An independent variable is the variable that is changed in a scientific experiment to test the effects on the dependent variable.
A dependent variable is the variable being tested in a scientific experiment.
The dependent variable is 'dependent' on the independent variable. As the experimenter changes the independent variable, the change in the dependent variable is observed and recorded.
For example, a scientist wants to see if the brightness of light has any effect on a moth being attracted to the light. How bright the light is is controlled by the scientist. This would be the independent variable. How the moth reacts to the different light levels would be the dependent variable.
When results are plotted in graphs, the convention is to use the independent variable as the x-axis and the dependent variable as the y-axis.