These are significantly expanded lecture notes for the authors minicourse at MSRI in June 2012, as published in the MSRI lecture note series, with some minor additional corrections. In these notes, we give an example-motivated review of the deformation theory of associative algebras in terms of the Hochschild cochain complex as well as quantization of Poisson structures, and Kontsevichs formality theorem in the smooth setting. We then discuss quantization and deformation via Calabi-Yau algebras and potentials. Examples discussed include Weyl algebras, enveloping algebras of Lie algebras, symplectic reflection algebras, quasihomogeneous isolated hypersurface singularities (including du Val singularities), and Calabi-Yau algebras.