When a task request is received, SQL Server will attempt to allocate the task to an available worker thread. If no worker thread is available, a new one will be created to handle the task, up to the configured maximum number of threads. Once that maximum limit has been reached, task requests will queue until a thread becomes available. As you might guess, it's quite a lot more sophisticated than that, but that is essentially what it boils down to. If you want to know more detail, there are plenty of articles on Google that will explain it in as much detail as you want.