Condensed milk has lots of added sugar.
Both start the same way: milk is heated until a large share of its water evaporates. Evaporated milk is then canned as is, unsweetened. Sweetened condensed milk has a large amount of sugar added, usually ending up around 40 to 45 percent sugar, making it a thick, pourable syrup.
That sugar does the preserving. Condensed milk was developed in the 1800s as a way to keep milk safe without refrigeration, and it became a key ration for soldiers and travelers.
In the kitchen, they do different jobs. Sweetened condensed milk is the base for key lime pie, tres leches cake, fudge, Vietnamese iced coffee, Thai iced tea and Brazilian brigadeiros. Evaporated milk is for savory sauces, pumpkin pie and anywhere you want creaminess without sweetness.
Don't swap one for the other. Using condensed milk in a savory recipe makes it sugary, and evaporated milk won't set a pie the way condensed milk does.