Suppose that $ \mathcal{X} $ is a (real or complex) Banach space, $dim \mathcal{X} \geq 2$, and $\mathcal{N}$ is a nest on $\mathcal{X}$, with each $N \in \mathcal{N}$ is complemented in $\mathcal{X}$ whenever $N_{-}=N$. A ternary derivation of $\al$ is a triple of linear maps $(\gamma, \delta, \tau)$ of $\al$ such that $\gamma(AB)=\delta(A)B+A\tau(B)$ for all $A,B\in \al$. We show that for linear maps $\delta, \tau$ on $\al$ there exists a unique linear map $\gamma:\al \rightarrow \al$ defined by $\gamma(A)=RA+AT$ for some $R,T \in \al$ such that $(\gamma, \delta, \tau)$ is a ternary derivation of $\al$ if and only if $\delta , \tau$ satisfy $\delta(A)B+A\tau(B)=0$ for any $A,B\in \al$ with $AB=0$. We also prove that every ternary derivation on $\al$ is an inner ternary derivation. Our results are applied to characterize the (right or left) centralizers and derivations through zero products, local right (left) centralizers, right (left) ideal preserving maps and local derivations on nest algebras.