Don't start deleting files
Your first instinct will be to find the bad code and remove it. Resist it. Take a full backup of the compromised site first: files and database. You'll need it to find out how they got in.
Put the site into maintenance mode
Protect your visitors and your search ranking by taking the site offline with a simple maintenance page while you work.
Rotate every password
Admin accounts, hosting, database, SFTP, and any API keys stored in plugins. Assume all of them are known.
Find the way in before you clean
Most hacks we see come through an outdated or abandoned plugin. If you clean without closing the hole, you'll be doing this again next week.

