Someone filed a tax return using your spouse's SSN. If you or your spouse didn't do it by mistake, someone else might have made an error entering their SSN and it happened to match your spouse's SSN, or it could be identity theft. In any case, you cannot correct the error. You will have to file your tax return by mail.
If you suspect identity theft, call the IRS Identity Protection Specialized Unit at 800-908-4490, Monday - Friday, 7 a.m. - 7 p.m. your local time (Alaska & Hawaii follow Pacific Time). Do not mail your tax return until after you call the IRS. They will give you instructions for how to file your return.