If someone filed a return in your name, you usually find out when your own return is rejected as a duplicate. File Form 14039, the Identity Theft Affidavit, with your real return on paper. If Letter 5071C or 4883C arrives asking you to verify your identity, respond; that letter is real and means the IRS stopped a suspicious return.
Then get an Identity Protection PIN. It is a six-digit number, new each January, that must appear on any return filed under your Social Security number. A return without it is rejected, which shuts the door on anyone filing as you. The fastest way is through your IRS Online Account. How to get an IP PIN.
If you paid a scammer, report it to the Treasury Inspector General for Tax Administration and the Federal Trade Commission. If you claimed a credit that turned out to be bogus, amend before the IRS writes; penalties are far lower for a taxpayer who comes forward.