This is the single most important tip here. Far too many hacks occur because someone hasn't updated Windows or Internet Explorer. Make sure Windows, macOS and iOS are always up-to-date with the latest patches, and that any applications that face the internet, such as web browsers and email clients, are also updated.
If a product is no longer supported, such as Windows XP or Internet Explorer versions 6 through 10, then upgrade to a newer version. If your device is too old to receive the latest updates, it's time for a new device. (Caveat: Many Android users can't update to the latest version of Android, because their device makers or wireless carriers won't let them.)