The stability and ion loss in a linear electrostatic ion trap are investigated experimentally and by numerical simulations. The decay of a stored 4.2-keV Ar+ beam was monitored for various potential configurations of the trap. Both classical trajectory calculations and optical models were used to numerically study the stability and dynamics of the trapped ions. Two different modes of trapping were identified with very different dynamical properties. It is found that the ion-loss processes are controlled by collisions both with residual gas species and among the stored ions.