We analyze when integral points on the complement of a finite union of curves in P 2 are potentially dense. We divide the analysis of these affine surfaces based on their logarithmic Kodaira dimensionκ. Whenκ = −∞, we completely characterize the potential density of integral points in terms of the number of irreducible components on the surface at infinity and the number of multiple members in a pencil naturally associated to the surface. When integral points are not potentially dense, we show that they lie on finitely many effectively computable curves. Whenκ = 0, we prove that integral points are always potentially dense. The bulk of our analysis concerns the subtle case ofκ = 1. We determine the potential density of integral points in a number of cases and develop tools for studying integral points on surfaces fibered over a curve. Finally, nondensity of integral points in the caseκ = 2 is predicted by the Lang-Vojta conjecture, to which we have nothing new to add.In a related direction, we study integral points in orbits under endomorphisms of P 2 . Assuming the Lang-Vojta conjecture, we prove that an orbit under an endomorphism φ of P 2 can contain a Zariski-dense set of integral points (with respect to some nontrivial effective divisor) only if there is a nontrivial completely invariant proper Zariski-closed set with respect to φ. This may be viewed as a generalization of a result of Silverman on integral points in orbits of rational functions. We provide many specific examples, and end with some open problems.