What is the difference between yams and sweet potatoes?

They are not the same. Here's an answer from the Library of Congress:

http://www.loc.gov/rr/scitech/mysteries/sweetpotato.html