Yams are a type of tuber that people eat. They’re not fruits though—yams don’t contain seeds. They are tubers and therefore vegetables.
Note that yams are different than sweet potatoes. They come from two entirely different plants. Sweet potatoes are still vegetables, but they are tuberous roots, not actually tubers which come from the stem. It is unlikely that most Americans have actually eaten a true yam. They’re mostly only grown in Africa and are much closer to regular potatoes.