Regression analysis seeks to determine the relationships between a fixed variable and one or more random variables. In a simple regression, a single variable is studied apart from others, such as the number of death penalty cases (fixed) and the race of the defendants (random). This often leads to an incomplete analysis, so multiple variables are analyzed. For instance, a multiple regression would take into account educational level, socio-economic status, intelligence scores, or other random variables.
Correlation seeks to show the correlation between two variables. For instance, you might study the relationship between daily calorie intake and weight. Showing that more calories result in higher weight may indicate a causal relationship between the two variables, but causality is not the goal of this analysis. In a correlation analysis, neither of the variables is fixed and the researcher's job is to figure the relationship between the two. That is, you may find that for every 500 calories a person eats, he gains 9 ounces.
Regression seeks to show how a fixed variable predicts values of the random values. For instance, the number of diabetes patients in a population may be shown to predict the levels of physical activity or the type of diet in that group. In a correlation, both variables are random and the researcher shows how they change in relation to one another. Both procedures seek to show a relationship between variables.
Knowing when to apply a correlation or a regression analysis is vital to statistics. If you study rainfall and rates of grass growth, you might want a regression analysis: more rain equals more grass. However, the causal link does not run the other way; more grass does not cause more rain. Here, you may only need to show a correlation between variables. Showing a relationship between root growth and tree height, for instance, does not lend itself to a causal analysis. However, if you also study soil composition, rainfall and sunlight levels, you may have material for a regression analysis.