A CPU doesn’t have threads. Threads are a software thing that people unfortunately use to refer to this. When people refer to “how many threads a CPU has” they’re talking about hyperthreading ( name depends on CPU manufacturer ).
Hyperthreading allows a CPU core to perform better by “lying” to the OS and telling it that the CPU has twice the core count. So a 16 core CPU becomes a “24 core” CPU. To make the distinction we call these cores “logical cores” ( vs “physical cores” ) or “threads”.
During operation, sometimes a CPU core needs to idle to wait on a resource, such as while loading a file into memory or waiting for another core to finish something. Since the CPU has nothing to do now, it can start working on another thread until whatever it was waiting for is over.
So hyperthreading is more about time management than amount of cores. You’re still doing one instruction at the same time per core* but hyperthreading still allows one core to do more things in a given time frame. Hence 24 cores/24 threads > 16 cores/24 threads > 16 cores/16 threads.
* Modern processors can execute more than one instruction at the same time per core but that’s out of scope for this answer
Latest Answers