Gmail is commonly hacked by criminals who want to send spam from your email account to people in your contact list because they know it's much more likely to be opened as the person knows you. If there has been an unusual amount of activity on your account, or if the account has been logged into from IP addresses that you don't normally use, Google will eventually take notice and send you an email alert to change your password.
If you are afraid your Gmail account has been or will be hacked, you can use a handy tool that Google provides to help you. First, log into your Gmail account and then scroll to the bottom of the page. You will see a line of text that says something like:
Last account activity: 14 minutes ago at this IP (34.248.195.22). Details
Click on Details and a chart will pop up that lists all activity on your account.
In the chart you will see the last IP addresses that logged into your account. You will see the IP addresses that you use to log in with. If an unusual address shows up in the list, Gmail will show it in red. If you haven't logged in from the place listed in red, your Gmail account has been compromised.
There is also a button at the top left of the chart that says "sign out all other sessions." Press this button if you see that someone is logged into your account. It will boot them out and you can change your password.
At the bottom of the chart you will see change. If you click this button, you will be given the opportunity to have Google alert you if there has been suspicious activity on your account. The alert will only be visible to you; the hackers won't be able to see it.
It's also important to change your password at least twice a month. Don't use the same password for every website you go to. That makes it much easier for the hackers to get your password. They won't try to get your password from a website with good security like your bank; they'll get your password from a website you have an account with that doesn't have good security like an online forum or a shopping site. If your password is the same everywhere the hacker can now log into your financial accounts.