The Australian mania for property investment means that many of us have to grapple with the concept of capital gains tax, but it's commonly misunderstood. The Australian Taxation Office has a useful primer on capital gains.
Picture by funkybug
One useful link within that primer defines exactly what a "main residence" is — you don't have to pay capital gains tax if you sell your main residence, but if you sell a secondary investment property, you're liable for CGT in the year the sale takes place. There are rules determining whether a property qualifies as your "main residence", but they're not absolute — each case is assessed on its merits (something to bear in mind if you move out of a house you own and begin renting it out).