What is the difference between thread-safe and non-thread-safe code?

Technical