The doGet method is for handling HTTP GET requests and the doPost method is for handling HTTP POST requests.
If a client clicks a hyperlink a GET is sent to the server, which causes the doGet to be invoked.
If a client submits a form, generally a POST is sent to the server, which causes the doPost to be invoked.
For more detailed information on POST and GET see the spec at:
http://www.ietf.org/rfc/rfc2616.txt