Start here. This is the direct spoken answer to practice first.
Overview
Connects browser-sent session cookies to Django's CSRF token checks for unsafe requests.
Django session authentication identifies the user from a session cookie that the browser sends automatically. That automatic credential behavior creates CSRF risk for state-changing requests, so Django's CSRF middleware checks a token on unsafe methods. Server-rendered forms include {% csrf_token %}. JavaScript requests normally send the token in the X-CSRFToken header while keeping the request same-origin.