What are race conditions and how do you prevent them?

Technical