... I usually thank someone when they say something that I would like to thank them for saying... Like something that I didnt know, and it helped me, or something that I strongly agree with...

I think thats how most people go about it.