If you put code in a scriptlet (the older <% %> tags), they are translated by the JSP compiler into the _jspService() method. This method is invoked whenever the JSP page is accessed, either directly by the client, or internally within the container using a server-side forward or include.
The _jspService() method cannot be overridden. The JSP compiler creates the body of the service method in the same order as the code appears in the JSP page. Therefore, the variables are created as local variables and are initialized every time the service method is invoked.
In cases where you use the older <%! %> tags or the newer jsp:declaration tags to define methods, the variables are created and initialized when the declared method is executed.
By the way, all implicit variables will be initialized by the container.
Additional details of this behavior can be found in the JSP Specification, and in the JspPage javadoc.
If you want to know how the JspPage and the HttpJspPage class is initialized and used by the container, you will have to go through the container source code. However, the JSP specification (chapter 11 on the JSP container contract) defines how the JSP container initializes and creates the JSP page. Usually initialization of the page class itself is done once; at this point jspInit() is invoked. When the page is destroyed, usually on application or container shutdown, the jspDestroy() method is invoked before the page is destroyed.
Update
EL expressions eventually find the bean, by attempting to resolve the variable in the page, request, session and application scopes. The variable to be used should have been declared and initialized in the appropriate scope. JavaBean components can be initialized using the jsp:useBean tag. Other objects should have been declared and initialized in a servlet or in a scriptlet.