If you're receiving benefits based on your own work record, your benefits will continue. If you're receiving spousal benefits based on your former spouse's work record, those benefits will generally end upon your getting remarried, but you may be able to receive benefits based on your new spouse's work record, or on your own.
If you're a widow(er) under age 60, or you're disabled but under 50, remarriage ends any benefits based on the record of your deceased spouse. However, if you remarry after age 60 (or after 50 and are disabled), those benefits remain intact, unless you get spousal benefits through your new spouse (at age 62 or older) if those benefits are higher. If your second marriage ends as a result of death, divorce, or annulment in less than 10 years, you will again be eligible to collect benefits on your first spouse's record. Benefits paid to a disabled widow(er) are unaffected by remarriage.
Note, too, that if you were the working spouse during your first marriage, your remarriage does not change the Social Security benefits paid to either your new spouse or ex-spouse. Because the rules surrounding payment of benefits are complicated, and depend on your particular situation, contact the Social Security Administration at (800) 772-1213 for more information.