Cell phone companies in North America provide an email address format that you can use to send an SMS message. This is outgoing only and will probably have a limit on how many can be sent per day. You have to know who the carrier is to know the email format (because it isn't standard). In other place (such as India) this may not be available.
There are many companies offering paid SMS gateways. I have used Twilio. It has good documentation and examples so it wasn't difficult to get it working. You can signup and use it in a test mode for free (you will be the only receipient in test mode).