Start here. This is the direct spoken answer to practice first.
Overview
Spring Security protects Servlet applications through an ordered filter chain before the controller is invoked.
A Servlet request reaches Spring Security through a delegating filter that invokes FilterChainProxy. That proxy selects one SecurityFilterChain and runs its security filters in order. A relevant authentication filter extracts credentials and delegates authentication; on success, the resulting Authentication is placed in a SecurityContext. Later authorization filters decide whether the request may continue to Spring MVC, while security exceptions are translated into an authentication challenge or an access-denied response.