How many threads can ran on a CPU at a time

Every processor has some #number of cores and every core can run some #number of threads simultaneously. For ex: If a processor has 2 cores and each core can process 4 threads at a time simultaneously, then that processor can run 4*2=8 threads at any given instance of time.


That depends on what you mean by "at the same time." You could have an infinite number of threads executed on the same processor via switching, i.e. executing one line of code from one thread and then switching to another, executing one line of code, and then switching back. The processor mimics "simultaneous execution" by switching back and forth really quickly.

However, most processors are limited on the number of true simultaneous threads they can execute to the number of cores they have, but even that is a bad estimate due to shared resources and hardware. In theory you could have up to 4 simultaneous threads running on a 4-core processor.