There is an important difference.
'Thank you' is more sincere than 'thanks', so you use 'thank you' for a bigger favour, and 'thanks' for a smaller one. As Peachey says, 'thanks' is a condensed word, so it's appropriate for casual conversation only.
In a more formal situation, or if someone does you a larger favour, you need to say 'Thank you' or 'Thank very much'. Have you ever heard anyone at an Academy Award ceremony just say 'Thanks?'. No - because it's too casual.
If a friend lends you their pen, you would say 'Thanks' or 'Thanks very much'. But if your friend drove on a three-hour journey to help you, you wouldn't say 'Thanks' - that would be insulting. You'd need to say 'Thank you' to show you were sincere in your gratitude.