If you think you know this idiom, you have another think coming!

Rather than being a freestanding phrase, another think coming is really the conclusion of a longer colloquial expression about being sorely mistaken, as in "If she thinks she's going to be allowed to stay out past her curfew, she's got another think coming." That first "If she thinks…" clause is essential for the "another think" part to make sense.

These examples show how the repetition of think sets up a cause and effect, what programmers would call an "if-then" statement:

If she'd thought she was going to be asked to sit down, she had another think coming(A Long Way from Chicago)

Similarly, if any bright spark in the Treasury thinks that the last budget flopped because of poor presentation, they've got another think coming. (The Guardian)

Another thing coming is a case of mishearing becoming misspelling, and it's easy to understand why if you say another think coming out loud. Thing is a useful word, but its flexibility is a liability here — it could refer to almost anything. In the examples below, what thing do they have coming? A picnic? A rhinoceros? A bad case of chickenpox? The word thing is too vague for the reader to tell.

If he thinks I'm going to sit around crying over him, he's got another thing coming. (The Girl on the Train)

If European leaders were expecting him to be humbled, they had another thing coming. (New York Times)

Think is often used as a noun in Britain, where this expression originated. You'll hear people say, "I had a good think this morning," for example. The confusion of think with thing is largely an American phenomenon, because speakers of American English rarely use think as a noun. But the beauty of another think coming is its implication of deep contemplation: you may have given the subject some thought, but you reached the incorrect conclusion and need to think about it some more. It's a more interesting way of saying, "You're wrong about that, and you should reconsider."