Shorting a stock isn't for the timid. It's a bold bet on a stock's decline, and it can certainly pay off nicely when a naysayer nails a call. How does a short sale work? What can go right? What can go wrong?

Let's cover all of the bases.

How does a short sale work?
If an investor or speculator feels that a stock is heading lower, going short is a strong consideration. Initiating a position starts with placing an order to go short, and is filled if a broker is able to locate the shares to borrow for the transaction.

Going short flips the traditional buying process around. After all, you are essentially selling the borrowed stock first. You then buy it back when you want to close your position, zeroing out the stake. 

Let's use a real world example to illustrate the process. Let's say that you want to short shares of Shake Shack (SHAK 4.41%). You wouldn't be alone. There were almost 2.4 million shares sold short as of mid-June, and that's a bigger number than it seems since the fast growing burger chain has a float of just 5.9 million shares, according to S&P Capital IQ data.

That should make it difficult for a broker to locate available shares to borrow, but let's assume that your trade to sell 500 shares of Shake Shack short goes through. You're selling borrowed shares, so the proceeds of the sale are credited to your account. When you're ready to cover your position you're essentially placing an order to buy back the number of borrowed shares you shorted.

Things that can go right with a short sale
Let's say Shake Shack shares head lower. You initiated the short sale with the stock at $50, and you cover your short when the stock is at $40. Well done. Your 500 shares went from a value of $25,000 when you shorted it to $20,000 when you covered. Your profit from the transaction is a cool $5,000. 

In a world loaded with overvalued stocks and companies with broken models there's no shortage of opportunities to make money shorting a stock. However, there are plenty of things can that can trip you up along the way.

Things that can go wrong with a short sale
There are more things that can go wrong than can go right with a short sale. For starters the process isn't as seamless as going long. A broker needs to locate the stock to borrow for the transaction. There are also some restrictions like naked shorts and the alternative uptick rule.

There's also the market's historical tendency to go higher, something that can burn investors during a market rally or prolonged holding tenure. Investors short a company also need to shell out the money for any dividends paid out, something that doesn't apply to Shake Shack since it doesn't offer distributions.

However, the biggest risk to initiating a short position is that there is no limit to the downside. A short sale can only gain 100% if the stock goes to zero, but there's no cap on the carnage if a stock shoots higher. If Shake Shake goes from $50 to $150 by the time an unfortunate short seller covers the investor is on the hook for the $50,000 difference on the initial $25,000 short sale and the $75,000 value when the position is closed.

There's also the possibility that good news on a heavily shorted stock -- just like Shake Shack -- can result in an exaggerated move higher as those short the stocks place buy orders to cover their stakes. The market calls that a short squeeze, and it's a common occurrence. 

So, yes, learning how short sales work is important. It's also important to consider the risks that come with the transaction.