When someone sends an SMS, a text message in the original mobile phone sense to your iPhone, it appears in a green bubble rather than a blue one, as would be the case if someone sends you an iMessage.
Before Yosemite, SMSs would only appear on your iPhone where you'd have to peck out a reply, but now you can have them come into your Mac or other iOS devices when they arrive so you can reply to them from there too.
Your iPhone needs to be running iOS 8.1, but once it is, and once you're signed into your iMessage account that also has your phone number linked to it both on your iPhone and on your Mac or other iOS devices, turn on the Text Message Forwarding option under Settings > Messages on your iPhone.
Your iPhone needs to be running iOS 8.1, but once it is, and once you're signed into your iMessage account that also has your phone number linked to it both on your iPhone and on your Mac or other iOS devices, turn on the Text Message Forwarding option under Settings > Messages on your iPhone.