A thread is a flow of execution through a process's code with its own program counter and stack. Threads provide a way to improve performance through parallelism. There are two types of threads: user level threads which are managed by user libraries but cannot take advantage of multiprocessing, and kernel level threads which are supported directly by the operating system and allow a process's threads to run concurrently on multiple processors. Kernel threads can schedule other threads while one is blocked but have higher overhead than user threads.