Refresh tokens are used to maintain a user's authentication status without requiring them to log in multiple times. When an access token expires, a refresh token can be used to obtain a new access token, ensuring continuous authentication.