It depends on what you are trying to do. There are tons of strategies out there.
One strategy is to just use a trailing stop loss and move that stop loss up every time the stock goes up. This way you do not get out of a stock at the top, but you do get out once it starts turning around and as close to the top as possible.
Another way to go about it would be to simply have a target that once it reaches that target it is time to sell. That is the benefit of things like chart patterns because they give you an idea of where your target should be.
On the other hand if you are investing into fundamentally strong stocks over the long term you may never want to sell your stock, at least not until you need the money, because that gives it more time to grow.
There are just different strategies depending on how you want to approach the market.
Whatever you do, it is smart to have some sort of plan in place before you enter the trade. That way you do not end up in a trade without knowing your next move.