Eject a Disk on a Mac
There are a few ways to properly eject a disk on a Mac, the first and perhaps the easiest method is to use the Disk Eject Key which is located in the upper right hand corner of a Mac keyboard (it looks like the image to the right).
Other options are dragging the Disks icon into the Trash which will eject it, or highlighting the disk in the Mac Finder and then either hitting Command+E to eject or hitting the eject icon next to the disk name in a Finder window, as seen in this screenshot:

These methods are how you safely eject a disk on a Mac, and you should pay special attention to do this properly when using an external hard drive to prevent any data loss from occurring. This can happen when you improperly eject a disk or drive, and you’ll get an error message to warn you that says “The disk was not ejected properly” like the screenshot below:

Getting in the habit of properly ejecting a disk is important to ensure the health of external drives. This is particularly true for external hard disks to ensure that the disk head is parked before it is moved, having an unparked disk head move improperly or suddenly could potentially cause data loss or damage to the drive.
If you need to, find out what to do if you have an exceptionally stubborn stuck disk in a Mac DVD drive. If it’s stuck in a portable Mac, learn how to eject a stuck DVD from a MacBook & MacBook Pro which involves an advanced tip sent in by a Mac Genius.

I have been getting the “The disk was not ejected properly .” message for months. How do I get rid of the message?
I turns my MAC on from its Sleep mode quite often.