In this paper we study the time evolution of the decay process for a particle confined initially in a finite region of space, extending our analysis given recently (Phys. Rev. Lett. 74, 337 (1995)). For this purpose, we solve exactly the time-dependent Schroedinger equation for a finite-range potential. We calculate and compare two quantities: (i) the survival probability S(t), i.e., the probability that the particle is in the initial state after a time t; and (ii) the nonescape probability P(t), i.e., the probability that the particle remains confined inside the potential region after a time t. We analyze in detail the resonant and nonresonant decay. In the former case, after a very short time, S(t) and P(t) decay exponentially, but for very long times they decay as a power law, albeit with different exponents. For the nonresonant case we obtain that both quantities differ initially. However, independently of the resonant and nonresonant character of the initial state we always find a transition to the ground state of the system which indicates a process of ``loss of memory'' in the decay.