Your Mac will check your spelling as you type in many applications, underlining mistakes in red, but did you know that it can also check your grammar?
To activate the feature in any application where you want to use it (such as Safari, TextEdit, or Mail), open the application and click Edit->Spelling and Grammar->Check Grammar with Spelling. It will remain active when you quit and restart the application until you deactivate it in the same way.
Not all apps are compatible but many are, especially built-in OS X apps.
What OS X considers bad grammar will be underlined in green, but beware that grammar checking is nowhere near as accurate as spell checking, and—quite simply—OS X will probably get it wrong a lot of the time. However, if English isn’t your first language it can certainly be helpful in highlighting potential issues.
Right-clicking any words or phrases highlighted as bad grammar might not provide a suggested correction of the suspected error, unlike with spelling mistakes, or even a description (although suggested corrections might appear for simple mistakes, such as mistaking “it’s” for “its”).

However, to see the nature of the error, you can hover the mouse cursor over the underlined phrase or word until a tooltip appears, which will explain the problem, or you can perform a complete spell and grammar check using the Spelling and Grammar dialog box. To begin a full check, click Edit->Spelling and Grammar->Show Spelling and Grammar. Clicking the Find Next button will cycle through any highlighted errors (both spelling and grammar), with a description of what your Mac thinks the error is for grammar mistakes.