The answer depends on the volume of messages you expect to send. If it will be more than 10,000 per day, then you probably want to run your own SMS/WAP gateway using appropriate providers (i.e. connecting directly to the higher volume service providers). Note that running your own gateway will also facilitate the 2 other methods of sending messages - but in those cases you let a third party handle the routing.
For less than this, life will be a lot simpler if you rely on a service aggregator - they usually provide an SMTP or HTTP interface. The API details are usually specific to the aggregator.
While there are an increasing number of aggregators catering to the low volume market, if you're expecting to send less than 300 texts / month, then the most cost effective option may be to use a GSM modem (most modern mobiles will connect directly to a PC and act as such).
How much it costs depends on where you are, where your customers are and the quality of service you require - but for a origin - billed SMS with low priority routing and reasonable volumes, expect to pay something in the region of 0.04-0.1 UKP).