When you initiated your short transaction, there were shares that were borrowed for you to be able to sell in the open market. Sometimes the lender of the shares will need their shares back and will call their shares back. Your broker will try to return said shares from another pool of willing lenders or from its own inventory but sometimes it will be necessary for you to buy back the shares so that they can be returned to the original lender. This is called a "forced buy-in" and is a risk you take on when initiating a short position. It is possible that your whole position or a portion of it is forced to be closed out (regardless of the current profit or loss on it).
Another situation that can occur is that when the position was initiated, from the time when the locate was executed until the point in time where you sold short the inventory of stock might have run out. In such a situation, your initial short sale will go through and you will receive the proceeds and open a short position but your broker will not be able to deliver the shares to the buyer(s) and new shareholder(s) (i.e. whoever bought the shares you sold short). Your broker has 3 business days from the transaction date to deliver the shares to the other party. If it does not do so, there will be a "Fail to deliver" status on the transaction and your broker will issue a forced buy-in call that you will have to execute so that new shares are bought in the market and deliver to whoever bought your shares (from when you opened your short position originally). This will close out the transaction and might result in profit or loss to you depending on the price at which they were executed. Most brokers will issue the buy-in call and allow you a day or two for you to buy back the shares yourself so you have some control on the price (remember, this might be your whole position or only a portion of it). If you fail to do so though, your broker has the right to close out your short position (fully or partially).
How often are buy-in calls made?
In my personal experience, dealing with a large stock broker I have personally never been forced to close out a short position when it's not my intention. Keep in mind though, that short positions fit in my trading strategy only on a very short term basis (much shorter than when I am long). I have been told by my broker that it does not happen very often but they do have the right to force you to close out a short position. This can never happen to a long position, unless you are issued a margin call.