There are several main laws concerning dividing property with some exceptions. If you had the property before the marriage it is yours. If you were gifted the property during the marriage it is yours. If you inherited the property during the marriage it is yours. There are legal terms that may help you obtain some of that property that would normally not become yours.
There is a legal term that is called the marital portion. If your spouse started his/her 401K before you were married, that is his or her separate share/portion. Let’s say in your case it was 5 years. Then you have been married for 10 years after that. If the first 5 years prior to the marriage, the spouse had $10,000 of 401K and from the date of marriage until the divorce your spouse was contributing to his/her retirement account and it is now at a value of $40,000. The spouse who started the 401K would be entitled to the original $10,000 plus half of ($40,000-$10,000) = $30,000 and divided by 2 = $15,000 for a total of $25,000. The other spouse will receive $15,000.