Most travellers will have zero contact with Australia's police or legal system; if they do, it's most likely to be while driving.
Driving There's a significant police presence on Australian roads, and police have the power to stop your car, see your licence (you're required to carry it), check your vehicle for road-worthiness and insist that you take a breath test for alcohol (and sometimes illicit drugs).
Drugs First-time offenders caught with small amounts of illegal drugs are likely to receive a fine rather than go to jail, but the recording of a conviction against you may affect your visa status.
Visas If you remain in Australia beyond the life of your visa, you'll officially be an 'overstayer' and could face mandatory detention and be prevented from returning to Australia.
Legal Advice It's your right to telephone a friend, lawyer or relative before police questioning begins. Legal aid is available only in serious cases and is subject to means testing; for legal aid info see www.nationallegalaid.org. However, many solicitors do not charge for an initial consultation.
When travelling within Australia, whether by land or air, you'll come across signs (mainly in airports and interstate train stations and at state borders) warning of the possible dangers of carrying fruit, vegetables and plants from one area to another. Certain pests and diseases (fruit fly, cucurbit thrips, grape phylloxera…) are prevalent in some areas, but not in others: authorities would like to limit their spread.
Quarantine control between states mostly relies on honesty, but some posts are staffed and officers are entitled to search your car for undeclared items. Generally they will confiscate all fresh fruit and vegetables, so it's best to leave shopping for these items until you're in the next state.