With iOS 8 and OS X Yosemite, Apple sought to connect its devices with features such as Handoff, which lets you start a task on one device and pick it up on another; phone call relaying, personal hotspot, and SMS and MMS relaying. The last feature allows you to forward messages from your iPhone to your iMac, MacBook or iPad, and it's one of those features that, once you use it, you'll marvel at the neolithic world we lived in just a few short months ago. Now you'll no longer have to leave your computer to check on the chimes you heard coming from the other room, and you'll be able to type your messages a whole lot faster.
Of course we've had this for iMessages for a while, but now you can send to and receive from non-iPhone people (SMS texts require a cell phone carrier while iMessages are routed through Apple's servers).
Here's how to set up SMS and MMS message relaying between your iPhone and Mac:
1. Make sure your iPhone is running iOS 8.1 or later and your Mac is running OS X Yosemite.
2. Make sure both devices are signed into the same iCloud account. You don't need to be on the same Wi-Fi network.
3. Text forwarding is turned off by default, so you will need to enable that. On your iPhone go to Settings -> Messages and tap on the "Text Message Forwarding" option.
4. This brings up a screen that shows you a list of all your devices that are signed into the same iCloud account and thus available to send and receive text messages. Toggle your Mac on.
5. You will be prompted to confirm the device with a security code that your Mac will provide. Simply enter the code on your phone and your done.
Now you can send and receive SMS messages on your Mac. With Continuity you can also relay phone calls from your iPhone to your Mac. See how to do that here.