Why does Curley agree he "won't tell" about Lennie crushing his hand and say he got it caught in a machine?
In this case, Curley is almost entirely motivated by the threat to his own reputation.
Recall that Curley was introduced, in Chapter 2, as a bully, and not a very intimidating one. He's described as a "little guy" and a lightweight, the sort of person that everyone knows (from their own experiences) to be "scrappy". Basically, Curley is constantly looking for fights because he wants to prove, to himself and to others, that he's not weak. This is also a significant element of his tension with his wife; his inability to control her wild behavior indicates weakness on his part, at least according to his own feelings and the gender standards of the time period.
For as much of a tyrant as he is, Curley doesn't really have much power, besides being the boss's son. This is the real source of everyone's animosity toward him; they know that he's likely to fall back on his father's power if he doesn't get his way. However, in this case, Curley can't really lie his way out of a shattered hand; if you put two and two together, it seems pretty likely that Curley would pick a fight with Lennie, and then lose that fight. Getting his hand "caught in a machine" is a reasonable lie, in fact probably the only one, which allows Curley to preserve his ego.
Slim warns Curley that if he tries to get Lennie in trouble, Slim will tell everyone what really happened, and everyone will laugh at Curley. This is, of course, Curley’s greatest fear, that people will think he isn’t the tough guy he wants them to think he is, so he agrees.