According to hibernate's official documentation, a session is "the main runtime interface between a Java application and Hibernate." I am aware the functionality of a session is to provide a physical connection between the application and database. However, my question is, what exactly is a session and how does it work behind the scene?