Yes, something like this. While two separate processes have access to different parts of the memory and both have their own memory, threads are within one process. They are branches that are being executed. The CPU switches about 10000 times between threads in one second. That was a program seems to be running more than just one piece of code parallelly. Imagine a server that runs a thread for each connected client. Usually multi-threaded applications are hard to debug because you need to take care of global memory access because two threads accessing and writing at the same memory location will nullify the action of one of them. It's undeterministic which will succeed so usually various mechanisms are used to ensure that threads work properly (i.e. locking of resources so only one thread can currently access that memory location).
As I said, it's not really running at the same time, but it's being simulated quite well.