cotton on

Intermediário superior (B2)informal

To slowly figure out what is going on.

"It took me a few minutes, but I finally cottoned on that he was joking."