Short answer
HubSpot's KB: Automatically deactivate inactive users from your HubSpot account runs monthly and is switched on by default. Super Admins manage it from the inactive users section.
1. In HubSpot
The relevant screen in my demo portal.

2. Worth knowing
If a deactivated user owned records or appears in workflows, reassign those first.