I do not really understand the question fully, but I am guessing it means how the wave function is collapsed when the particle is not observed.
I am not sure if we know exactly how/why the wave function collapses on observation. I will try, may be you will find the answer somewhere in it.
Let us take an example of double slit experiment where observing the electrons/photons causes them to abandon the wave nature and start behaving like particles. i.e. the interference pattern disappears.
Now, why the measurement causes a switch from wave nature to particle behavior? I will try explaining it with one specific example scenario. This example can be extended to other scenarios with necessary adjustments
Collapse of a wave into an observed particle -
Suppose the entity moving through double slit is an electron (in wave form). Let us observe it by shining a laser on it. If we were to observe the electron with the laser, then the laser has to be reflected off the electron. Right? But, in order to reflect the laser, the electron has to turn into a particle. Why? Because a wave can not reflect off a wave. A wave (laser) can only reflect off a particle. Therefore, in order to reflect the laser, the electron must turn into a particle; otherwise, the observation is just not possible using a laser. Therefore, if there is a measurement via laser, the electron must behave like a particle, not a wave. This is collapse of the wave into a particle that was observed.
Collapse of a wave into a particle that was not observed -
Suppose you shine the laser on one slit and the electron passes through the other slit. Even in this case, before measurement, the electron wave was passing through both the slits. By shining the laser on part of the electron wave, we force the electron wave to turn into a particle, but due to wave density distribution, the particle is materialized through the other slit and does not reflect the laser. So, in this case also, the laser causes the electron to turn into a particle without being reflected off it. This is collapse of the wave into a particle that was NOT observed.
Same concept can be applied to measurement via other type of detectors.
Why the Collapse of a wave becomes mandatory?
Why the laser is reflected off the electron in the first place? The actual reason for this can be the fact that the specific laser frequency that detects the electron can not coexist with electron wave at the same point of space time. So, when they meet, one has to collapse. Laser being more fundamental wave, it is the electron wave (less fundamental wave) that gives way and collapses. When collapsed, it becomes a particle and may reflect the laser depending upon where the particle is materialized. This is why when we try to observe the electrons in either of the slits, it causes interference pattern to disappear irrespective of whether the electron was seen or not. This is an example description of wave collapse in classical sense.
Quantum eraser – No need to go back in time
Past the slits, the part waves that passed through each slit interfere with one another even though the two parts remain connected. The connection now is not as smooth as it was before the slits and so, the non-smooth connection causes the whole wave to behave as if there were two different waves, and so, it behaves as if there is interference.
When the laser is shined past the slits, the wave nature collapses as described in previous sections and the electron turns to particle and interference is gone again, so the pattern disappears even if we shine the laser past the slits. Therefore, there is no need to go back in time and there is no erase of anything. It is just a collapse happening past the slits and the particle materializes as if it passed through one of the slits.