This monograph presents some cornerstone results in the study of sofic and hyperlinear groups and the closely related Connes' embedding conjecture. These notions, as well as the proofs of many results, are presented in the framework of model theory for metric structures. This point of view, rarely explicitly adopted in the literature, clarifies the ideas therein, and provides additional tools t…