A vector space is finite-dimensional if some finite list spans it; its basis then has a finite number of elements. Otherwise it is infinite-dimensional. Polynomials of degree at most $n$ form a finite-dimensional space; all polynomials form an infinite-dimensional space because arbitrarily high powers are independent.