What it means is that if you are an immediate relative of a US citizen (spouse, parent and minor children) then you can adjust status even if you are out of status (before or after your marriage doesn't matter).
If you are married to a US citizen you can adjust your status regardless if you overstay or if you work illegaly, etc. The only things that are not excuse is if you enter without inspection, if you were a K1 visa and married another person, and other that right now I don't remember.