What to do if someone tries to hack you

You’ve interacted with scammers or visited a phishing site. What steps should you take to avoid being hacked?