A process is an independent unit of system resource allocation and scheduling.
A thread is an entity of a process that is the basic unit of CPU dispatch and dispatch, which is a smaller unit that can run independently than a process. The thread itself basically does not own system resources, it only has a bit of resources that are essential in the run, but it can share all of the resources owned by the process with other threads that belong to one process.
The main difference between processes and threads is that they are different ways to manage operating system resources.
The process has a separate address space, and after a process crashes, it does not affect other processes in protected mode.
A thread is just a different execution path in a process. Threads have their own stacks and local variables, but there is no separate address space between threads, and a thread that dies equals the entire process dead (a process with only one thread). For some concurrent operations that require simultaneous and shared variables, only threads are used.
Nutshell
A program has at least one process, and a process has at least one thread.
The process has independent memory units during execution, while multiple threads share memory.
Processes and Threads