We recently introduced the concept of "k-essence" as a dynamical solution f
or explaining naturally why the universe has entered an epoch of accelerate
d expansion at a late stage of its evolution. The solution avoids fine-tuni
ng of parameters and anthropic arguments. Instead, k-essence is based on th
e idea of a dynamical attractor solution which causes it to act as a cosmol
ogical constant only at the onset of matter domination. Consequently, k-ess
ence overtakes the matter density and induces cosmic acceleration at about
the present epoch. In this paper, we present the basic theory of k-essence
and dynamical attractors based on evolving scalar fields with nonlinear kin
etic energy terms in the action. We present guidelines for constructing con
crete examples and show that there are two classes of solutions, one in whi
ch cosmic acceleration continues forever and one in which the acceleration
has finite duration.