The single most useful thing to know before choosing a potato for a recipe isn't the variety name, it's where that variety falls on the starchy-to-waxy spectrum. That one variable predicts more about how a potato will behave in the pan than almost anything else.
Potato cells are packed with starch granules, and the ratio of starch to water in a given variety determines its texture once cooked. High-starch, low-water potatoes cook up light, dry, and fluffy, since the starch granules absorb water and swell dramatically, forcing the cells apart. Low-starch, high-water (waxy) potatoes hold their shape through cooking because their cell walls stay largely intact.
Russets are the standard starchy potato: rough brown skin, white flesh, oblong shape. Their high starch content makes them the default choice for baking, where that starch produces a dry, fluffy interior under a crisp skin, and for mashing and frying, where the same trait produces light, creamy mash and fries with an airy interior. The tradeoff is that starchy potatoes fall apart easily in liquid, which makes them a poor choice for soups or salads where you want distinct pieces to survive the cooking process.
Red potatoes and fingerlings sit at the waxy end of the spectrum: thin, smooth skin, and flesh that holds together firmly after boiling or roasting. This makes them the right choice for potato salads, gratins, and roasted preparations where you want each piece to keep a clean, defined shape rather than dissolving at the edges. Push a waxy potato through a ricer for mash and the result is noticeably denser and gummier than a starchy variety would produce, since there's less starch available to create lightness.
Yukon Gold and other yellow-fleshed varieties sit in the middle of the spectrum, with enough starch to mash reasonably well and enough structural integrity to hold up in a roast or gratin without falling apart. This middle-ground behavior is exactly why all-purpose varieties dominate grocery store shelves: they're a safe default across most cooking methods, even if they're not the absolute best choice for any single one.
A recipe that simply calls for "potatoes" without specifying variety is leaving the most consequential decision up to chance. For the deeper mechanics of why the wrong variety produces gluey mash or waterlogged salads, the underlying starch behavior is covered in The Science of Starch.