Well it depends on what happens.
No matter how the parties like to spin it, elections in Australia put people into those seats, not the Party. As a result, if a politician has a falling out with the party and leaves the party, they are still the member. They are now an Independent, or the member of whatever party they choose to join.
However, if something more permanent happens, like a politician retiring, being forced to stand down due to illness or other activities, or passing away while in office, then what happens next depends on which house they are in.
If they are in the House of Representatives, then a by-election is called. This is treated exactly the same as a normal House of Representatives election except only for the affected electorate. If a regular election is due soon, the by-election may be skipped.
If they are a Senator, then a Casual Vacancy is filled. The State Parliament of the affected Senate seat holds a joint sitting of both houses and an appoint a replacement to serve the remainder of the term. Usually this is a person from the same political party as was vacating, but not always. Queensland only has a single house, so a joint sitting is not required. For the Northern Territory and the Australian Capital Territory, the decision is made by their Legislative Assembly.