Australia, like other countries such as New Zealand, Singapore, and more (including China after the initial outbreak, but of course information from China is often unreliable), have applied a "zero Covid" strategy.
The goal is to:
- prevent the virus from entering (this is really the key)
- whenever it still manages to enter, stop it very aggressively from spreading so that it disappears.
The first part, for Australia and New Zealand, is made a lot easier by the fact that they are isolated islands/continents, relatively far away from other land masses, with limited continuous exchanges with neighbouring countries, and the ability to effectively cut off most travel in or out (which is very different from the UK for instance).
So they applied very strict restrictions on entry into their territories, real quarantine (not "please stay at home and please don't see anyone during your self isolation, or we will be very unpleased").
It was also helped by the fact that during the initial spread of the virus throughout the world, before many of the important facts were known (human-to-human transmission, asymptomatic transmission, airborne transmission, fatality rate...), they were relatively spared, possibly thanks to the yet-to-be-fully-understood seasonal effect. So when they started isolating, there were few cases inside the countries, and those local clusters could be curtailed through the usual very restrictive measures which have been applied elsewhere (masks, social distancing, strict lockdowns...).
At the opposite end of the spectrum, many other countries, especially in Europe and the Americas had already extensive numbers of infected people in many different places before anything could be understood, were in the middle of winter, faced significant difficulties in getting PPE when needed, and had to address varying policies and stages of the pandemic in different countries/regions/states which have extensive exchanges with them.
Many European countries also faced the "summer surprise": the virus seemingly vanished during the summer, only to return with a vengeance at fall, after the virus had spread out a lot more through asymptomatic cases.
Once you get past a certain number of cases, you can only slow down propagation, it's a lot more difficult to really stamp out the fire. As soon as there's even a single person with the virus, the risk of it spreading to millions is still there. But getting back to 0 when you have had tens of thousands of cases per day is virtually impossible. Due to the exponential nature of contagion, it takes a lot of time, i.e. very very long lockdowns, and that is economically, psychologically, medically and politically devastating.