An independent variable is the the variable or phenomena that is believed to cause change to occur. It is the variable over which the researcher has control. In education, being exposed to curriculum is believed to cause learning, for example, so the independent variable is the curriculum delivered. In medicine, the independent variable would be the new medication that was administered.
The dependent variable is the variable believed to react to the independent variable. It depends on the independent variable. The amount of material learned is presumed to depend on the curriculum. The amount of improvement in a disease would be expected to depend on the mediation taken.
Categorical variables are not measurable, but are classifications. For instance, gender, ethnicity, hair color and immigration status are categorical variables. These variables are not measured on any scale but are descriptive categories. In contrast, a quantitative variable can be counted or measured. An ordinal variable can be ordered but not measured. An example is a scale marked poor, fair and good. A student's reading level is a quantifiable measure, because it can be measured and accurately expressed by numbers. The number of calories eaten or hours slept are also quantifiable variables.
A mediating variable is also called an intervening variable. This is a variable that acts between other variables. Reading and learning may be associated, but the student's intelligence quotient may be mediating variable affecting how the independent variable -- amount of reading -- affects learning. Moderator variables are variables that change the outcome. For instance, the amount of sleep between studying and testing might modify the outcome of the effect of the independent variable, study time, on the dependent variable, test results.
Figuring out the prescise relationship between variables is the goal of quantitative research.