This is an important question, as non-resident businesses will generally be taxed on income that has an Australian source, while Australian resident entities are taxed on their worldwide income.
Most non-resident businesses will operate in Australia through a company structure. A company only becomes a resident of Australia if it's incorporated in Australia, if it conducts its business in Australia and is controlled by Australian residents, or if it has Australia-based management.
For full details, visit the ATO website.