Whilst both pronouns are widely used, usage varies between regions in Germany, Austria and Switzerland. Broadly speaking, "du" is taken to be informal and "Sie" is taken to be formal - however the usage of these varies depending on where you are. It is always safest to use "Sie" rather than "du", as using the informal pronoun in a formal situation may cause offence. Generally, "Sie" is used when speaking to someone you do not know, someone older than yourself, or someone who naturally requires respect - for example, with a doctor, with your friend's grandparents, or with your partner's family - or when talking to a teacher in a classroom.
"Du" is used for situations such as talking to friends or family.
If in doubt, you should always use "Sie" - whilst you may be too formal, you are unlikely to offend anyone by using the wrong form.
"Du" and "Sie" also require different verb forms - "Sie" takes the same conjugation as "wir", and "du" has its own conjugation (e.g. du hast).