You don't sell Bitcoins on Bitcoinica - for that you need to go to an exchange.
Bitcoinica lets you leverage 1:5 in BTCUSD.
I'll give a little example (though I'm a bit new myself), anyone can feel free to correct me:
You deposit 1 BTC when the market is at 5 USD/BTC. This gives you a margin of 5, with a tradable balance of 25. From here you can decide to long or short. If you long it, you 'buy' BTC at X price in hopes it goes up. If you long 3 BTC when it is at 5 USD, and it goes up to 6 USD, you've made 3 USD. If you short it, you sell 3 BTC at 5 USD, and it goes down to 4 USD, you've made 3 USD.
But it isn't so easy. On the right of your screen, you'll see that P/L, Net Balance, and Maintainence.
P/L is your current profit/loss. Green is profit, red is loss. It'll start out as a loss every time (due to the spread).
Your Net Balance is your Margin + P/L. If your P/L is green, your margin will be higher than when you started. If it is red, your margin will be lower.
Your Maintainence is... somehting. Not really sure. BUT what I have read is that if your maintainence ever exceeds your Net Balance, you get a 'margin call'. That means the market has gone too far from where you ordered and even with the 1:5 leverage you don't have enough to maintain your account - so it liquidates it. To prevent liquidations, be sure to set stop-loss orders.
Hope this helps!
edit: to clarify some things: you need to lock in your profits just like you stop-loss orders. These are called 'limit' orders. Also you can choose to simply 'liquidate' your current position, which will lock in whatever the current market is (weather it be a profit or a loss)
Once your positions are cleared, you can choose to withdrawl MtGOX USD CODE or BTC.
Should have read this first, tried to sell 20 btc to test this out, really had no clue how I could get a balance of -$2.49857 and still had 20btc, while I sold 20 btc. lol
Got the 1 $ credited to my account tho