A processor with 2 cores operating at 1 kHz can execute 2000 commands per second, right?
Not quite. For the simplest processors, that might be true. But many processors can can execute multiple instructions simultaneously (in a single core, without hyperthreading), and most processors have instructions require more than one clock cycle to complete.
how is it possible to have limitless availability of threads that execute commands simultaneously while only having a finite number of physical units that do so?
Time slicing. Basically, dividing the CPU's time into short durations. Keep a queue of all the threads, run one thread for a while (e.g a few hundred microseconds), then stop it, stick on the back of the queue, and run the next thread.
This does mean that only one thread per core is running at any given moment. But, even on a single core computer, we can maintain the illusion of multiple threads running simultaneously because human consciously process things in the tens to hundreds of milliseconds range, a duration during which there will have been many different threads running.
Most operating systems today use preemptive multitasking, in which the OS will forcibly pause a thread after its allotted time slice expires. Some use cooperative multitasking, in which a thread will continue executing until the thread itself decides to yield and let someone else run.
You may wonder how the operating system gets to run in order manage all these threads.
In cooperative multitasking, it should be fairly obvious that the executing thread can execute an instruction that hands control to the OS (comment if it's not clear). Yes this does mean that it's easy for a poorly behaved application to bring the whole system down, which is why most mainstream operating systems aren't cooperative these days.
In preemptive multitasking, the hardware generates an interrupt after a given length of time (which the OS can usually configure). Interrupts cause the CPU to jump to an interrupt service routine, to handle that particular interrupt. ISRs are set up by the kernel while booting, so when the timer interrupt fires, the OS gets control and can swap out which thread to run next.