The Shit Hits the Fan

What does the idiom “the shit hits the fan” mean?

Definition: (When) serious problems that have been expected finally occur

Example: This company is in deep trouble. I’m going to quit before the shit hits the fan.

Note: This is obscene, but quite common.