I don't know who "u" is, but I'll try to give you a start:
1) When the button is clicked, a request is made to a
servlet (usually via a form submission).
2) The servlet gathers the data for the entity to be added.
3) The servlet calls a "model" class that's in charge of persistance for the entity in question.
4) The model class uses
JDBC to insert a record into the appropriate table.
5) Control returns to the servlet which forwards to a
JSP that shows whatever results are appropriate.