Simple, (but your question is not that clear).
Whatever you use, Windows, Mac, Linux or other (are there?), there are places where applications write to in order to keep logs of what you do, what you install etc.
In Windows this is done in the Registry, in Mac this is in the Application Preference folder (I think), and Linux, usually in the
/var (I think) folder.
This data usually includes information such as registration details, date installed and more.
When you get a new computer or restore a computer, this information is wiped and you can reinstall - it will not even know you previously ran a trial.
As for online activation, it resets over time. It is only there to prevent people who activate many times or are blatantly pirating, it does not stop genuine users of the software.
I hope this helps, if you have any other questions on it, feel free to ask.