In science, a variable is any factor, item or condition that can change. An experiment usually has three kinds of variable: independent, dependent, and controlled.
An experiment is used to find an association between different variables looking for a cause and effect relationship. If such a relationship between variables can be found, then outcomes are predictable and can be used to your advantage, or may be manipulated or changed.
Quick Summary
Independent Variables
The independent variable is the one that is manipulated or changed by the scientist. It represents the cause or reason for an outcome. A change in the independent variable directly causes a change in the dependent variable.
Example: Consider an investigation to find out if the launch angle of an arrow fired from a bow affects its range (the horizontal distance it travels). The independent variable would be the launch angle.
Dependent Variables
A dependent variable is the variable that you observe and measure. You have no control over the dependent variable; you want to observe what happens to it when you change the independent variable. If there is a direct link between the independent and dependent variable then you may be uncovering a cause and effect relationship. The number of dependent variables in an experiment varies, but there can be more than one. Example: In our arrow example, the dependent variable is the range of the arrow. This is what we are observing and measuring. We could also choose to measure the time of flight of the arrow. This is another possible dependent variable but we don't define it as such since we did not mention time of flight in our experimental aim.
Controlled Variables
Experiments also have controlled variables. There are many factors in an experiment that could affect the dependent variable. In an ideal experiment, you only want to see the effect of the one variable (the independent variable) that you are trying to test so you should keep all other variables the same (you control them). Some people refer to controlled variables as constant variables.
Example: In the arrow example, you would need to control the force with which the arrow is fired, the type of bow, the type of arrow, weather conditions and the firing height. Why? If you did not, then other explanations could be given for any differences that you observe in the arrow's range. For instance, a head-wind could push the arrow off track so it could not travel as far or a larger bow may fire the arrow with more force so that it travels further. Or a thinner shaped arrow head could allow the arrow to travel further due to less air resistance.
Most experiments have more than one controlled variable. Not all variables can be held completely the same, such as the wind conditions in the arrow experiment. In these cases, these variables should be included when discussing the results of an investigation and suggestions made for how their effects can be reduced.