When a single program performs two or more tasks apperently
simulteneously then it is called multithreading.and each unit
of work is called a thread.
When two or more threads needs access to the same resource at the same time
they need to ensure that only one thread can access the resource at a given point of time.
The process of achieving this condition is called Synchronization.