Let R be a commutative ring with 1 not equal 0 and n a positive integer. In this article, we study two generalizations of a prime ideal. A proper ideal I of R is called an n-absorbing (resp., strongly n-absorbing) ideal if whenever x(1)...x(n+ 1) is an element of I for x(1), ..., x(n+1) is an element of R (resp., I(1)...I(n+1) subset of I for ideals I(1), ..., I(n+1) of R), then there are n of the x(i)'s (resp., n of the I(i)'s) whose product is in I. We investigate n-absorbing and strongly n-absorbing ideals, and we conjecture that these two concepts are equivalent. In particular, we study the stability of n-absorbing ideals with respect to various ring-theoretic constructions and study n-absorbing ideals in several classes of commutative rings. For example, in a Noetherian ring every proper ideal is an n-absorbing ideal for some positive integer n, and in a Prufer domain, an ideal is an n-absorbing ideal for some positive integer n if and only if it is a product of prime ideals.