Thanks is less formal than thank you. You can use "thank you" with close friends, associates, and family members, even professional colleagues who know each other well. You can also use it in informal situations, as when a stranger holds the door open for you when your arms are full.
"Thank you" can be used if someone gives you a gift in a more formal situation, and any situation where you aren't so close to the other person.
More informal:
"Thanks"
"Thanks a lot."
"Thanks a bunch."
"Thanks a million."
More Formal:
"Thank you."
"Thank you so much."
"I can't thank you enough."
"I'd like to thank you from the bottom of my heart."