servlet-mapping : You have a servlet-mapping corresponding to every URL pattern that you want your web application to support. The value of the url-pattern tag is the form action. For instance, if your application context is, say, 'shopping', then the form action will be "/shopping/login"
servlet : You have a servlet tag for every servlet of your application.
The container looks for the request URI. In this case, it is "/login" after the context has been stripped out. It takes the servlet name for this URI as "Login" (from <servlet-name> in <servlet-mapping> , goes to all <servlet> tags and looks out for one with this name. It takes the class "LoginServlet" from the <servlet-class> tag of the matching <servlet> tag and executes the request method in it (doGet, doPost ...)
I would add that it's a bad idea to hardcode the context name your HTML. "/shopping/login". Rather, use the request.getContextPath() property to read it dynamically. This way if you ever have to change the context name, or a second instance (shopping_test, shopping_dev) etc, you won't have to work though all of your code to update it.