In this thesis we study discrete dynamical system, given by a polynomial, over both finite extension of the fields of p-adic numbers and over finite fields. Especially in the p-adic case, we study fixed points of dynamical systems, and which elements that are attracted to them. We show with different examples how complex these dynamics are. For certain polynomial dynamical systems over finite fields we prove that the normalized average of the numbers of linear factors modulo prime numbers exists. We also show how to calculate the average, by using Chebotarev's Density Theorem. The non-normalized version of the average of the number of linear factors of linearized polynomials modulo prime numbers, tends to infinity, so in that case we find an asymptotic formula instead. We have also used a computer to study different behaviors, such as iterations of polynomials over the p-adic fields and the asymptotic relation mention above. In the last chapter we present the computer programs used in different part of the thesis.