Student or Learner
when can I use these words?
what are the situations of them?
"Thank you" means "I thank you".
"Thanks" means "I give you my thanks."
In that respect there's no difference.
"Thank you" is more formal than "thanks".
In a situation like this [forum], you could write "Thank you for your reply" or "Thanks for your reply".
Broadly, you could use this context as a guide. Anything more formal, especially in writing, use "Thank you".