Unshelled peanuts are salted simply by soaking in brine. Some of the salt (and water) gets through the shell, which is a bit porous. They're then re-dried and roasted. I suppose the roasting is optional, but if you're adding salt you clearly want flavor, and that's what roasting's for too. There's a Serious Eats post with a bit more detail if you're curious.
You can do something similar at home - boiled peanuts. They won't be the hard crunchy roasted nuts you're used to: they end up soft, kind of like firm beans. You can season the water and impart plenty of flavor. The traditional thing in the American South is just salt, but you can use spices and get some pretty fun results. For example, a bit of soy sauce and five spice (or some of the components of five spice), or something Cajun-style (even just using premade Cajun spice blends).
(And no, unsalted peanuts shouldn't taste salty. You can confirm this by searching for unsalted peanuts nutrition facts, and seeing the 0mg of sodium!)