This can be achieved in one of the following 2 ways:
- If you have a direct connection to an operator's SMSC (i.e. Short Message Service Centre) then you can use the SMPP protocol and Logica have a very good java library which you can download for free at
http://opensmpp.logica.com. Some operators also support HTTP requests however you would have to know the format of the request and response headers or whether for example the response is contained in the BODY of the HTTP response.
- If however you don't have a direct connection which is generally the case, then you can use a GSM modem connected to your PC via the serial port. In this case you would communicate with the modem via the RS232 protocoal and use the AT command set to execute tasks such as send and receive SMS. For the benefit of those who don't know a GSM modem is a box in which you insert a SIM card and using a standard AT command set, you can execute all the tasks that you would normally do with a standard handset thus enabling you to develop "telephony" type applications.
You can read a little more about the various options at
http://www.ihub.com/GSM%20Modems.htm