Although the terms sweet potato and yam are often used interchangeably, the two vegetables are not technically related. Yams, which are native to Africa and Asia, are related to lillies and grasses. Sweet potatoes, on the other hand, are in the morning glory family.
If you look closely, you can tell them apart. Sweet potatoes are typically more uniformly shaped and have tapered ends. Yams have rough scaly brown or black skin and off-white, purple or red flesh. Sweet potatoes typically have yellow, red, purple or brown skin and yellow, orange or orange-red flesh.
In terns of flavor, yams tend to be sweeter and moister. Sweet potatoes differ in flavor depending on the variety — paler, thinner-skinned sweet potatoes have lower sugar content and are dry and crumbly in texture, similar to a white baked potato. The more common, darker-skinned sweet potatoes have vivid orange flesh and are sweeter in taste and more moist in their texture — these are the sweet potatoes often mistakenly called yams.
Despite their differences, commonly available varieties of both sweet potatoes and yams are fairly similar in taste and texture, you can generally use them interchangeably in recipes.