This paper reviews recent advances in the foundations of causal inference and introduces a systematic methodology for defining, estimating, and testing causal claims in experimental and observational studies. It is based on nonparametric structural equation models (SEM)-a natural generalization of those used by econometricians and social scientists in the 1950s and 1960s, which provides a coherent mathematical foundation for the analysis of causes and counterfactuals. In particular, the paper surveys the development of mathematical tools for inferring the effects of potential interventions (also called "causal effects" or "policy evaluation"), as well as direct and indirect effects (also known as "mediation"), in both linear and nonlinear systems. Finally, the paper clarifies the role of propensity score matching in causal analysis, defines the relationships between the structural and potential-outcome frameworks, and develops symbiotic tools that use the strong features of both.