Step 1: Disconnect your Mac from the internet.
Step 2: Enter the safe mode.
Step 3: Check your activity monitor for malicious applications.
Step 4: Run a malware scanner to check.
Step 5: Verify your browser's homepage and extension.
Step 6: Clear your cache.