This is one of the most difficult aspects of trading for amateurs to master. In fact many professional find it difficult to master! How often have you staring at your sreen watching a bad position lose more and more of your hard earned money. You keep managing to convince yourself that it is just about to turn around, yet it doesn't. Eventually you cut it out when you literally can't afford to lose any more money and that is generally the bottom.
Prior to taking a position I work out where my stop loss is going to be. I then either write it down or else enter the stop loss into my trading system as soon as I have entered the position. I cannot stress how important it is to cut your losses. Some people find it very hard to do and will sit and watch a position go further and further into a loss.
This is not the way to trade. You have to be cold and calculating. Cut the loss and move onto the next trade.