In going short you are opening a position by selling the shares (or whatever else you are trading). To close the short position you have to buy the same quantity back. You are doing the opposite of a long position.
When you open a short position it is wise to have a stop loss order entered at the same time you open the short. The stop order would be set at a higher price than the price you opened the short, in case the price rises and moves against you to avoid you from losing all your capital and more (if you trade on margin).
Sometimes a trader will also place a take profit order at the same time they open their short. This can be used if you think the price might drop to a support level before it rebounds back up. So you might place a take profit order just above that support. When these are used they are placed as a one-cancels-the-other order with the stop loss order. That way if the price goes up and your stop loss gets triggered your take profit order will be automatically cancelled, or if the price goes down and your take profit order gets triggered then your stop loss order will be automatically cancelled. This way only one buy order can be triggered to close your short position and the second buy order will be cancelled automatically.