You have to go to a local social security office and fill out a piece of paper stating that you have gotten married/divorced and you have to have proof like a marriage license or a divorce decree. Once the information is in the computer you will received your card.
You do not need to go to the social security office, but you will need to fill out a form and submit it to the SSA with a CERTIFIED copy of your marriage license.