Both su and tu are possessive pronouns or determiners that can mean "your." However, that doesn't make them interchangeable.
The difference is the same as the difference between tú and usted. Tú is the informal or familiar way of saying "you" (singular), while usted is the formal way. Although there are regional differences in usage, the former is typically used with family members, friends or children, while the latter is used with others.
Tu, then, is used with people whom you'd address as tú, while su is used with people you'd address as usted. So to my mother I might say, "Tu computadora tiene un virus" (“Your computer has a virus”), while if I were working at an electronics shop I might tell a customer, "Su computadora tiene un virus." Su can also be used when speaking to more than one person (speaking to "you" plural), especially in Latin America.
Also, you should note that su can also mean "his," "her," "its" or "their." So "su computadora could mean "his computer," "her computer," "its computer," "their computer," "your computer" when speaking to one person, or "your computer" when speaking to more than one person. Usually the context will make it clear what is meant.