I\'m always confused about thread concepts. I haven\'t a chance to use them in a real environment so far. It would be helpful if someone could explain threads for me.
An individual thread is so named because it is a single thread of execution through your code. If you have multiple threads then you have multiple threads of execution through your code simultaneously (or as simultaneously as your single/multicore system supports). Both threads have access to the same heap though use different stacks. This means data in your program may be visible by both threads and may be changed by either thread. This can of course lead to serious problems which requires protection against.
It is worth noting that a thread is different to a process. A key difference is that two threads can access the same data (heap) while two processes cannot.
For a more full description see other online descriptions
wikipedia