how to prevent losses after a hard or soft fork i learned about hard and soft forks from this question; now i have a basic understanding about forks; but the answers of that question did not say what happens to transactions on the stale chain; if i understand correctly those transactions are simply given up? but this looks like people would lose their money if they received payments on the stale chain; how does the bitcoin protocol protect them in this case? (there is a timer for confirmation of transactions but i am still not sure how it is being used and why it is adequate;)
what happens to transactions on the stale chain; if i understand correctly those transactions are simply given up?


Correct. In the case of a stale (abandoned) chain, any transactions that happened in the stale blocks (that did not also happen in the active chain's blocks) would no longer exist on the bitcoin network. 


  but this looks like people would lose their money if they received payments on the stale chain; how does the bitcoin protocol protect them in this case?


Also correct. There is no built-in 'protection' against having a transaction included in a stale chain. As a user, it is almost always recommended that you wait for a few confirmations before you consider a transaction as fully settled. This helps ensure that your transaction isn't included in what will eventually become a stale chain. Often, people quote six blocks as being a high level of assurance.

In practice, we can see that it is exceedingly rare for there to be a stale fork that runs longer than just a couple of blocks. See this question for some examples of past forks.