This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
If are asking your question from Front end (JSP / HTML) perspective then Loius has provided an explanation
But if are asking from server side perspective then answer is -->
once we send a GET/POST request to our server code then doService() method (generic method) decides whether to call doGet() OR doPost() depending upon request type