We present a comprehensive study of linear and nonlinear effects observed in the scattering process of surface plasmon polaritons (SPPs) from localized two-dimensional surface deformations at a metal/dielectric interface. Thus, the electromagnetic field at the fundamental frequency (FF), for both p and s polarizations, is first determined by solving the corresponding set of reduced Rayleigh equations. The complete solution of these equations allows us to investigate both the complex structure of the scattered electromagnetic field as well as subtle mechanisms by which incident SPPs are scattered into radiative modes (light) and outgoing SPP waves. Furthermore, the electromagnetic field at the FF is used to determine the nonlinear surface polarization at the second harmonic (SH) and subsequently both the electromagnetic field distributions as well as the amount of light generated at the SH. Calculations are performed for three geometries that are relevant in many experiments, namely, Gaussian, hemispherical, and cylindrical nanodefects. Finally, throughout our analysis, we discuss potential applications of our findings to surface spectroscopy, surface chemistry, or imaging techniques of surface nanodefects.