In the first part of this paper we study the regularity properties of solutions to initial or boundary-value problems of Fredholm integro-differential equations with weakly singular or other nonsmooth kernels. We then use these results in the analysis of a piecewise polynomial collocation method for solving such problems numerically. Presented numerical examples display that theoretical results are in good accordance with actual convergence rates of proposed algorithms.