What do you look for in a stock that makes you say "I'm done with this, let me take profits and go somewhere else"?
I am a believer in stocks for the long term, I sat on the S&P right though the last crash, and am 15% below the high before the crash. For individual stocks, you need to look more closely, and often ask yourself about its valuation. The trick is to buy right and not be afraid to sell when the stock appears to be too high for the underlying fundamentals. Before the dotcom bubble I bought Motorola at $40. Sold some at $80, $100, and out at $120. Coworkers who bought in were laughing as it went to $160. But soon after, the high tech bubble burst, and my sales at $100 looked good in hindsight. The stock you are looking at - would you buy more at today's price? If not, it may be time to sell at least some of that position.
My theory is that for every stock you buy, you should have an exit strategy and follow it.
It is too hard to let emotions rule if you let your default strategy be "let's see what happens." and emotional investing will almost never serve you well.
So before buying a stock, set a maximum loss and maximum gain that you will watch for on the stock, and when it hits that number sell.
At the very least, when it hits one of your numbers, consciously make a decision that you are effectively buying it again at the current price if you decide to stay in. When you do this, set a new high and low price and repeat the above strategy.
Keep a diary, before buying write down why are you buying the stock, how long do you plan to keep it. Put down reasons when you would sell it. For example you buy a stock because it has lot of cash reserve, it is a focused company, good management. You would sell when management leaves or it starts to use its cash for acquisition that are not fitting in profile.