There is a very good documentation in Jersey website: https://jersey.java.net/documentation/latest/jaxrs-resources.html and https://jersey.java.net/documentation/latest/filters-and-interceptors.html

Here is a small flowchart that I made showing how the JAX-RS flow works:

jaxrs

Happy coding :)