What yoi;re describing is a catastrophic security breach, across multiple domains.
Access to your Wi-Fi (alone) won’t give access to your Mac.
Access to your Apple ID or your other passwords can, as can physical access.
If you think your Apple ID has been compromised - Apple Support
Usual path to recovery involves changing all of your passwords to new and unique values, enable two-factor authentication, reset your router and its passwords, update your Wi-Fi password to a new and ~15 character password, get your door key changed, and otherwise overhaul your security.
If your Mac passwords are known, you’re headed for a re-installation.
Photos or other data and door keys that have already leaked out of your control are not recoverable by technical means.
An iMac from late 2009 and newer can be upgraded to at least High Sierra, and the upgrade is free.
At least some of what you’re reporting here may well be considered a crime in most jurisdictions, though whether the police can be an option varies.