When a macroscopic system in contact with a heat reservoir is driven away from equilibrium, the second law of thermodynamics places a strict bound on the amount of work performed on the system. With a microscopic system the situation is more subtle, as thermal fluctuations give rise to a statistical distribution of work values. In recent years it has been realized that such distributions encode surprisingly more information than one might expect from traditional thermodynamic arguments. I will discuss a number of exact results that relate equilibrium properties of the system, in particular free energy differences, to the fluctuations in the work performed during such a nonequilibrium process. I will describe the theoretical foundations of these relations, connections with irreversibility and the second law of thermodynamics, and potential experimental and computational applications.