The Australian Tax Office website shows Tax Rates for individuals based on the income earned in the Financial Year.
Calculating what you'll be taxed
For instance, it show that every dollar you earn up to $18,200, you are not taxed. Every dollar over that, up to $37k is taxed at 19 cents. And so on..
So as an example, if your income for the year is $25,000 you will be taxed $1292.
$25,000 - $18,200 = $6,800
6,800 * 19 cents = 129200 cents (ie $1292) payable tax
Here's how it's look if you were doing it in a spreadsheet using the Tax Rates table on the ATO website as a guide:
If you income is $50,000, it'd look like this:
Your employer is obligated to remove the taxable part from your wage each time your paid. They do that using the calculation above.
If at the end of the financial year, the ATO determines that too much as been withheld (ie. you've claimed deductions that've reduce your taxable income to less than what your actual income is), that's when you may be eligible for a refund.
If your employer didn't withhold enough or you had income from other sources that haven't been taxed already, then you may actually need to pay rather than expecting a refund.
If you earn $18,200 in the year and for some reason your employer did withhold tax from your pay, say $2,000, then yes, you'll get all that $2,000 back as a refund since the Tax Rate for income up to $18,200 is $0.00.
If you earned $18,201 and your employer withheld $2000, you'd get $1999.81 back as a refund ($2000 - 19c). You have to pay 19c tax on that $1 over $18,200.