1.直到最后一秒种,他才想出答案。
Not until the last moment did he figured out the answer.
2.等到所有人都走了,他才离开教室。
Not until all the people had left did he got out of the classroom.
You can find out from the cases above that when 才 means ”not unitil" it's often used with the word '到". And as you many know "到" means "until" in Chinese.
You can omit the word 到 in some cases. for example:
我下个星期才去北京。
In addition, 才 often means the action is conducted late.