InN has emerged as a highly promising material for a number of technological applications, but progress is still hampered by lack of control over its conductivity. The material exhibits a high tendency for unintentional n-type conductivity, both in the bulk and on the surface. We discuss the origins of this conductivity, considering point defects, impurities, and surface states. First-principles calculations based on density functional theory, with suitable band-gap corrections, have been fruitfully applied to investigate doping issues. The results indicate that native point defects are unlikely to be the source of bulk conductivity and that attention should be focused on unintentional incorporation of impurities. In particular, hydrogen is a prime candidate for shallow donors in InN. Both interstitial and substitutional hydrogen have high solubility and give rise to n-type conductivity. Substitutional hydrogen consists of H sitting on a nitrogen site, bonding equally to the four In nearest neighbors in a multicenter-bond configuration (a highly unusual type of chemical bond). Substitutional hydrogen, somewhat counterintuitively, is a double donor. With regard to p-type doping, Mg is a promising acceptor in InN. Its ionization energy is ∼0.2 eV and it has lower formation energy in InN than in GaN. The problems encountered in p-type doping of InN are therefore not due to the properties of the acceptor, but to compensation by native defects or unintentional impurities acting as donors. In addition to the bulk conductivity, accumulation of electrons has been almost universally observed on InN surfaces. While donor impurities adsorbed on the surface could of course contribute to this conductivity, we have proposed that the accumulation layers are an intrinsic property of the material that can be attributed to the fact that on polar surfaces occupied surface states are located above the conduction-band minimum (CBM). Fermi-level pinning occurs due to occupied surface states above the CBM, for all In/N ratios, thus explaining the observed electron accumulation. Interestingly, we have found an absence of electron accumulation on nonpolar surfaces of InN at moderate In/N ratios, in agreement with experimental observations on cleaved surfaces. Consequences for growth as well as for devices will be discussed.