Gifts made before a marriage are treated as separate property of the person who received them. In order for a gift to be complete, the one giving it must unconditionally surrender control of it (“Take this, it’s yours, forever”).
Engagement and wedding rings are gifts made prior to marriage and so are treated as separate property. This means that you do not have to give them back in the event of a divorce.
Sometimes, this creates a problem in cases involving a ring that is a family heirloom of the husband’s family. In order to protect such an item, it should be made part of an ante nuptial (“before marriage vows”) agreement. Such an agreement must meet strict requirements to be upheld and so it is advisable to have an attorney prepare it.