The course begins with an introduction to the Standard Model, viewed as an effective field theory. Experimental and theoretical limits on the energy scales at which New Physics can appear, as well as current constraints on quark flavor parameters, are reviewed. The role of lattice QCD in obtaining these constraints is described. A second section is devoted to explaining the Cabibbo-Kobayashi-Maskawa mechanism for quark flavor mixing and CP violation, and to detailing its most salient features. The third section is dedicated to the study of K -> pi pi decays. It comprises discussions of indirect CP violation through K^0-bar K^0 mixing, of the Delta I=1/2 rule and of direct CP violation. It presents some of the lattice QCD tools required to describe these phenomena ab initio.