If you're married, in a civil union partnership or in a de facto relationship and your relationship ends by separation or because your partner dies, you'll be affected by the Property (Relationships) Act 1976 ("PRA"). The PRA helps determine how property is divided when relationships end.
The PRA applies automatically to married and civil union couples, and to couples who've been living together in a de facto relationship for at least three years. If you don't want the PRA to apply to you, you'll need to make a legal agreement contracting out of it. (The agreement must be in writing and meet various legal requirements, including that the parties each get independent legal advice.)
Dividing property if your relationship ends
Relationship Property v Separate Property
What happens if a partner dies?