You are borrowing somebody else's stock. For example, if I asked you "Can I borrow 100 shares of apple stock?" and you said yes, then I would take your shares and sell them immediately. I now have about $9600 in cash (AAPL:$96 x 100 shares) . At some point later on, I have to return your shares to you. Hopefully for me, the price of Apple stock has fallen so that buying back 100 shares will be cheaper. For example, if the price per share value was $84, then it would take $8400 for me to return your shares. In that case, my profit is 9600-8400 = $1200.
That's the basics of it. Actually pulling it off in a trading platform is a little more complicated because of things like margin requirements.