PrefaceAnalogy is one of the most effective techniques of human reasoning: When we face new problems we compare them with simpler and already known ones, in the attempt to use what we know about the latter ones to solve the former ones. This strategy is particularly common in Mathematics, which offers several examples of abstract and seemingly intractable objects: Subsets of the plane can be enormously complicated but, as soon as they can be approximated by rectangles, then they can be measured; Uniformly finite metric spaces can be difficult to describe and understand but, as soon as they can be approximated by Hilbert spaces, then they can be proved to satisfy the coarse Novikov's and Baum-Connes's conjectures.These notes deal with two particular instances of such a strategy: Sofic and hyperlinear groups are in fact the countable discrete groups that can be approximated in a suitable sense by finite symmetric groups and groups of unitary matrices. These notions, introduced by Gromov and Rȃdulescu, respectively, at the end of the 1990s, turned out to be very deep and fruitful, and stimulated in the last 15 years an impressive amount of research touching several seemingly distant areas of mathematics including geometric group theory, operator algebras, dynamical systems, graph theory, and more recently even quantum information theory. Several long-standing conjectures that are still open for arbitrary groups were settled in the case of sofic or hyperlinear groups. These achievements aroused the interest of an increasing number of researchers into some fundamental questions about the nature of these approximation properties. Many of such problems are to this day still open such as, outstandingly: Is there any countable discrete group that is not sofic or hyperlinear? A similar pattern can be found in the study of II 1 factors. In this case the famous conjecture due to Connes (commonly known as Connes' embedding conjecture) that any II 1 factor can be approximated in a suitable sense by matrix algebras inspired several breakthroughs in the understanding of II 1 factors, and stands out today as one of the major open problems in the field.The aim of this monograph is to present in a uniform and accessible way some cornerstone results in the study of sofic and hyperlinear groups and Connes' embedding conjecture. These notions, as well as the proofs of many results, are here presented in the framework of model theory for metric structures. We believe that this point of view, even though rarely explicitly adopted in the literature, can contribute to a better understanding iii iv of the ideas therein, as well as provide additional tools to attack many remaining open problems. The presentation is nonetheless self-contained and accessible to any student or researcher with a graduate-level mathematical background. In particular no specific knowledge of logic or model theory is required.Chapter 1 presents the conjectures and open problems that will serve as common thread and motivation for the rest of the survey: Connes' em...