Why Shared State Breaks

Why shared state breaks between threads: race conditions, non-atomic operations, visibility, and choosing volatile, atomics or locks.