Before you got married or entered a registered domestic partnership, anything you owned before that time is separate property and so are gifts and inheritances if they are made to only one spouse even if they are obtained during the marriage or domestic partnership.
Separate property is also any profits or income earned from your separate property, or any other property you buy with separate property also qualifies as such. An example of such would be if you bought an apartment building with some inheritance you received from a relative that has passed, the apartment building and rent belongs to you because you bought it with your separate property, even if it was obtained during your marriage or registered domestic partnership.
Once you divorce or separate, anything you earn or acquire after this point is your separate property.