The operating system offers [*time slice*](https://en.wikipedia.org/wiki/Preemption_(computing)#Time_slice)s of CPU to threads that are eligible to run.  

If there is only one core, then the operating system schedules the most eligible thread to run on that core for a time slice.  After a time slice is completed, or when the running thread blocks on IO, or when the processor is interrupted by external events, the operating system reevaluates what thead to run next (and it could choose the same thread again or a different one).  

Eligibility to run consists of variations on fairness and priority and readiness, and by this method various threads get time slices, some more than others.

If there are multiple cores, N, then the operating system schedules the most eligible N threads to run on the cores.

[*Processor Affinity*](https://en.wikipedia.org/wiki/Processor_affinity) is an efficiency consideration.  Each time a CPU runs a different thread than before, it tends to slow down a bit because its cache is warm for the previous thread, but cold to the new one.  Thus, running the same thread on the same processor over numerous time slices is an efficiency advantage.  

However, the operating system is free to offer one thread time-slices on different CPUs, and it could rotate thru all the CPUs on different time slices.  It cannot,  however, as @gnasher729 says, run one thread on multiple CPUs simultaneously.

Hyperthreading is a method in hardware by which a single ***enhanced*** CPU core can support execution of two or more *different* threads simultaneously.  (Such a CPU can offer additional threads at lower cost in silicon real-estate than additional full cores.)  This enhanced CPU core needs to support additional state for the other threads, such as CPU register values, and also has coordination state & behavior that enables sharing of functional units within that CPU without conflating the threads. 

Hyperthreading, while technically challenging from a hardware perspective, from the programmer's perspective, the execution model is merely that of additional CPU cores rather than anything more complex.  So, the operating system sees additional CPU cores, though there are some new processor affinity issues as several hyperthreaded threads are sharing one CPU core's cache architecture.