Thanks for your questions.
In the Australian Parliament there are no laws about members of the House of Representatives and senators leaving their political party and joining another party. Members are free to become an independent or join another political party whenever they wish, although this is not common.
Each political party has its own rules about members leaving their team. If a member wanted to join another party, their current party would need to decide what to do. Members may form their own political party.
Section 15 of the Australian Constitution states that if a senator dies or resigns from the Senate they are to be replaced by a new senator from the same party. However, if a senator has changed party while serving in the Senate, their replacement will come from the party which the departing senator was a member of when they were elected.