The difference between those two groups of potatoes is that the first group are "hard, waxy potatoes" and the second group are "soft, starchy potatoes". Waxy potatoes are lower in starch and higher in moisture; starchy potatoes are the opposite. There's also "all-purpose" potatoes like the Yukon Gold that are somewhere in between.
It's a general rule of thumb that starchy potatoes are better for roasting, mashing, cream soups, and other dishes where they are intended to get very soft or even dissolve. They are also generally considered better for french fries because their lower moisture content means more frying and less steaming. In fact, some cooks get obsessive about moisture content, even measuring specific gravity.
Waxy potatoes are recommended for most pan-frying recipes because the potato holds its shape, even in high heat. For example, one usually (but not always) uses waxy potatoes for potato chips, whether pan-fried, oven-baked, or deep-fried because one can easily slice waxy potatoes thinner without the slices breaking up. For pan-fried potatoes, one often (but not always) uses waxy potatoes, both because they hold their shape and because they are smaller, so they can be cooked in 1/2 or 1/4 potato wedges instead of sliced.
However, these are just rules of thumb and the type of potato you use should be based on what specific recipe you're using. For example, this french fry recipe with an unusual cooking method uses all-purpose or waxy potatoes. And the classic Joël Robuchon mashed potatoes are made with the waxy ratte potato. And Pommes Anna, despite being pan-fried, is better made with a starchy potato like a russett. So keep in mind that guidelines are just guidelines, and don't always apply.