Both observational and perturbational technologies are essential for advancing the understanding of brain function and dysfunction. But while observational techniques have greatly advanced in the last century, techniques for perturbation that are matched to the speed and heterogeneity of neural systems have lagged behind. The technology of optogenetics represents a step toward addressing this disparity. Reliable and targetable single-component tools (which encompass both light sensation and effector function within a single protein) have enabled versatile new classes of investigation in the study of neural systems. Here we provide a primer on the application of optogenetics in neuroscience, focusing on the single-component tools and highlighting important problems, challenges, and technical considerations.