Email hacks are so commonplace these days we hardly even pay attention. A lot of times recipients of strange emails may not even advise their friends that they got them.
If you get an email from a friend that just doesn't sound like them or includes just a link to a webpage, first delete the message, do not click on the link. Then tell your friend and hope that if the same happened to you, your friend would do the same.
If your mail does get hacked, here are some steps to follow to take back control.
1. Change your password. if you can't because your access is blocked, you'll need to contact your email company. Once you get control of your email again, make sure you set up a double authentication method (i.e. a password and a recovery email address or phone number you can use to prove ownership).
2. Let all your friends and contacts know that you were hacked so they don't attempt to click on the link or any other email they might get from you that seems suspicious.
3. Run virus scans on your computer and your email. Empty your trash.
4. Go into the settings of your email - you may have to do this both on the webmail page and on the email client you use on your computer and check to make sure that no auto forwarding or redirects have been set up. This might cause mail to be sent to off to the third party that hacked your account. If you find them, remove them.
5. If the password on your email was the same one you use on other sites or services, go to those and change them immediately.
6. Watch your email pretty carefully for a while to make sure you don't see anything strange happening. Also ask your friends to let you know if they get strange emails from you.
When you recreate your passwords, make them strong. That means no English-language words, at least eight characters and mix up upper and lower case letters, numbers and symbols. Here's a trick to create a strong password you might have a chance of remembering: take the song you danced to at your wedding and turn it into an acronym. Then swap out one or two letters with logical symbols like @ for a, $ for e.
Make sure you have a secondary email address set up on any online accounts - that way you can regain ownership more quickly if you are hacked. It's also a good idea to connect your mobile phone number to an account and require a pin be sent to you for any major changes or as a way to recover access.