Race conditions come up when you're working with multithreading. You might not be. But basically it's like....
You have thread A wanting to paint the screen red.
you have thread B wanting to paint the screen blue.
You set them both up and say "go". The operating system and/or runtime environment manages these threads to have them perform their instructions in some order, with absolutely no guarantees about which one finishes first.
Thus you have a race condition wherein you don't know which color the screen will wind up painted.