Fermented foods are fermented and don't contain vinegar yet taste "vinegary".
Pickled foods often have been preserved using vinegar, distilled vinegar, and so do not contain the enzymes that fermented foods do.
Your confusion is warranted as they both are often called by the same names, i.e. "Pickles" and "Sauerkraut", just for example. Read the labels. If it has vinegar as an ingredient it is not fermented. Actually, the original term for fermented was pickled. It has only been recently that old fashioned pickled products are referred to as fermented so as to make some distinction between the authentic naturally fermented pickles and the quicky vinegar pickles that are so common in grocery stores today. The fermented products are usually found refrigerated so that the fermentation will slow or cease. Sometimes the jar can explode under the right circumstances and the frementation process starts again and causes pressure in the jar. Always be sure to read the label; if it has vinegar in it, it is not fermented.