Tu (I don't have the accented u) is informal, so you'd use it for your best friend. Informal language is used for people you can speak casually to.
Usted is formal, so you'd use it for your doctor. Formal language is used for people you must respect, or can't speak casually to, like a teacher or someone older than you.