While Lennie is in Crooks's room talking about his dream, Curley's wife eventually comes in and talks to the men. She ends up telling the men that their dream is never going to happen and she makes fun of them.
Crooks talks back to her. When he does, she threatens to say that he came on to her. She knows that this will keep him in line. In those days, black men could easily get lynched for being too forward with a white woman. If she told her husband that Crooks had tried to hit on her, Crooks would at least have lost his job and maybe his life.