Does regression analysis measure cause and effect? Does regression analysis measure cause and effect?
If yes, then how? If no, then what is done? Please describe with an example. 
 A: Causal inferences are licensed primarily by the design of your study, not by the statistical techniques you use.  
The gold standard for causal inference has always been to run a controlled experiment*.  If you randomly assign your study units to treatment and control conditions and independently manipulate your treatment, you are typically safe to infer causality, if your analyses support the conclusion that there is a difference among the conditions.  It is perfectly fine for the analysis in question to be a regression, but any number of other analyses are equally fine (you could even use a correlation).  
One way people question such studies is to argue that the experimental manipulation induced a confound.  Imagine a study that tried to determine if a new medication lowered blood pressure.  Patients are randomly assigned to two groups, one set take the medication, the other do not.  At the end of the study, those taking the medication have lower blood pressure.  Does this mean that the medication lowers blood pressure?  Someone might argue that it does not, because the mediation is confounded with taking a pill (those in the treatment group took a pill - the medication, while those in the control group did not take a pill), that is, they argue that you simply detected the placebo effect.  (And they might be right; this is a poorly designed study!)  Notice, that what differs between this example, and a placebo-controlled double-blind randomized trial is not the analysis used (regression versus something else), but the design of your study.  
*As a footnote, let me mention that causality can validly be inferred without running a controlled experiment.  There are special techniques, such as instrumental variables, or situations, like natural experiments, that afford causal inference even with observational designs.  There is quite a bit to this, and it is beyond the scope of this answer to try to explain them.  What's worth laying out here explicitly though, is that these techniques are unrelated to whether you used a regression analysis, or some other statistical analysis.  
A: From "Mistakes in Thinking About Causation" of University of Texas:
Any statistics text worth its salt will caution the reader not to confuse correlation with causation. Yet the mistake is very common. As a refresher,  here's an example:

Consider elementary school students' shoe sizes and scores on a
  standard reading exam. They are correlated, but saying that larger
  shoe size causes higher reading scores is as absurd as saying that
  high reading scores cause larger shoe size.

In this example, there is a clear lurking variable, namely, age. As the child gets older, both their shoe size and reading ability increase.
Elaborating on this situation:

If you agree that increasing age (for elementary school children)
  causes increasing foot size, and therefore increasing shoe size, then
  you expect a correlation between age and shoe size. Correlation is
  symmetric, so shoe size and age are correlated. But it would be absurd
  to say that shoe size causes age.

In other words, even when there is a causal relationship, the causality typically only goes one way. (Of course, it could go both ways, as in a feedback loop.)
One situation where people slip into confusing correlation and causality is in regression. For example, one might regress college GPA on SAT scores, obtaining a positive coefficient beta of SAT score in the regression equation. Consider the following two statements:


*

*An increase of one point in SAT scores causes, on average, an
increase of β points in college GPA.

*For every increase of one point in SAT scores, the increase in
average college GPA is β points.


Statement 2 is correct (assuming, of course, that the regression has been carried out correctly). Statement 1 is incorrect: the regression equation gives no information about causality. Indeed, there is likely a lurking variable (or probably a bunch of lurking variables) that affects both GPA and SAT score; SAT score is considered to be a (perhaps crude) measure of this lurking variable.
