Even though not many people know this, you can actually send text messages and SMS directly from your Mac and you don't even have to install a third-party app for it. Furthermore, with a little bit of effort you can also text friends who don't have iPhones. In case that's something that you're interested in doing, here's a short guide to show you exactly what you need to do in order to send and receive text messages on Mac.
Sending iMessages to an iPhone is actually quite easy and all you need to do is to use Messages, an app that is installed by default on your operating system: simply launch the Messages application (its icon looks like a blue speech bubble) and sign in using the same Apple ID that you use on your iPhone. Next, click on the new message icon that's immediately to the right of the search bar, type the number or the email address of person that you want to contact in the To: field, then write your text in the iMessage field from the lower side of the window and press Enter.
In case your Contacts file is synced with your Mac, you will be able to add contacts simply by pressing the Plus sign. The people who have an iPhone will show up in a blue box in the To: field and this is important as it means that you'll be able to send the messages via Apple's servers instead of forwarding them through your iPhone. The last thing to know about this is that the recipients may get the messages sent from your Mac signed with your Apple ID instead of your phone number.
If the people who you wish to text from your Mac don't have an iPhone (they appear in a red box in the To: field), you're going to need to send an SMS instead of an iMessage and that will require you to forward the text through your iPhone. First, sign into the same iCloud account on both your Mac (System Preferences --> iCloud) and your iPhone (Settings --> iCloud), then open your iPhone's Settings and tap the Messages category. Once there, go to Text Messages Forwarding and you will see a list with all your other devices; turn the slider next to your Mac to the ON position, then enter the code from your Mac and you're good to go.
The message you've written on your Mac using the Messages app will appear as being sent from your iPhone and will count towards your total SMS tally. Also, once you've enabled the message forwarding option from your phone, it will stay activated until you manually turn it off, so you won't have to go through this step every single time.
Finally, as far as receiving texts on your Mac goes, things are even easier: if you've signed in with the same Apple ID on both your Mac and your iPhone and the Messages app is running, all the iMessages that you receive will be automatically shown on both devices. Furthermore, in case you've also enabled Text Messages Forwarding as shown above, every incoming SMS will also be displayed on your Mac.
There you have it friends, this is how you can send and receive text messages on Mac. Hopefully, this was one of the things your Mac can do that you didn't know about.