© 2018 Elsevier B.V. The dynamic behavior of individual skyrmions is highly affected by the defects in the materials that host them. Here we develop a theory to account for the effect that defects produce over the skyrmion dynamics. The skyrmion-defect interaction mechanism is explained at an atomic level as a local modification of exchange, Dzyaloshinskii-Moriya (DM) and/or anisotropy interaction. Relevant micromagnetic magnitudes as the energy density and effective magnetic fields arising from the presence of the defect are derived. We also find analytical expressions for the forces exerted by this defect over a skyrmion within Thiele's rigid approximation. Both point-defects as well as linear defects are considered.