The ExitThread function ends a thread.
VOID ExitThread(
DWORD dwExitCode // exit code for this thread
);
The TerminateThread function terminates a thread.
BOOL TerminateThread(
HANDLE hThread, // handle to the thread
DWORD dwExitCode // exit code for the thread
);