If you fail a unit, you will still use Student Learning Entitlement (SLE) for that unit, and be liable to pay your student contribution. You will also incur a HECS-HELP debt if you have chosen to obtain a HECS-HELP loan.
If you fail and ‘special circumstances’ apply, you may be entitled to have your SLE for the unit re-credited and any HECS-HELP debt removed (see How do I apply to get my SLE re-credited and debt removed?).