We review results concerning the θ dependence of 4D SU (N ) gauge theories and QCD, where θ is the coefficient of the CP-violating topological term in the Lagrangian. In particular, we discuss θ dependence in the large-N limit.Most results have been obtained within the lattice formulation of the theory via numerical simulations. We review results at zero and finite temperature. We show that the results support the scenario obtained by general large-N scaling arguments, and in particular the Witten-Veneziano mechanism to explain the U (1) A problem. We also compare with results obtained by other approaches, especially in the large-N limit, where the issue has been also addressed using, for example, the AdS/CFT correspondence.We discuss issues related to theta dependence in full QCD: the neutron electric dipole moment, the dependence of the topological susceptibility on the quark masses, the U (1) A symmetry breaking at finite temperature.We also review results in the 2D CP N −1 model, which is an interesting theoretical laboratory to study issues related to topology.Finally, we discuss the main features of the two-point correlation function of the topological charge density.