What happens if a MP leaves parliament? Do they get replaced?
Yes, you’re right! If a member of the House of Representatives resigns or dies between federal elections, they will be replaced in a by-election. A by-election is a an election held to fill a single vacancy in the House of Representatives outside of the regular 3-year election cycle.
Casting a vote for the House of Representatives

Australian Electoral Commission
Description
A voter is casting a vote in a federal election. They are placing their green House of Representatives ballot paper into the ballot box labelled 'House of Representatives'. Senate ballot papers are white and are placed into the other ballot box, labelled 'Senate'.
Permission should be sought from the Australian Electoral Commission (AEC) for third-party or commercial uses of this image. To contact the AEC email: media@aec.gov.au or phone: 13 23 26.