Mediational analyses have been recognized as useful in answering two broad questions that arise in HIV/AIDS research, those of theoretical model testing and of the effectiveness of multicomponent interventions. This article serves as a primer for those wishing to use mediation techniques in their own research, with a specific focus on mediation applied in the context of path analysis within a structural equation modeling (SEM) framework. Mediational analyses and the SEM framework are reviewed at a general level, followed by a discussion of the techniques as applied to complex research designs, such as models with multiple mediators, multilevel or longitudinal data, categorical outcomes, and problematic data (e.g., missing data, nonnormally distributed variables). Issues of statistical power and of testing the significance of the mediated effect are also discussed. Concrete examples that include computer syntax and output are provided to demonstrate the application of these techniques to testing a theoretical model and to the evaluation of a multicomponent intervention.