The guy inside the Spider-Man suit is usually a double -- that goes back to the '70s TV series. I think the guy they used probably had mime training, since he was good at exaggerating his head movements and body language to convey expression despite the immobile mask. They do the same thing in Power Rangers
today -- the people in the costumes are always doubles except when they take their helmets off, and even though they recast the on-camera stars every year, the suit performers often keep the same role year after year.
In the Raimi movies, the Spidey masks had a framework built in that kept them in the shape of Tobey Maguire's head no matter which stunt or performance double wore them.
Actors are busy people; when they're not on camera, they have to be getting their makeup and hair touched up, changing wardrobe, talking on the phone with their agents to line up new work, doing interviews, catching some precious moments of sleep or time with their families, etc. So if you don't actually see the actor's face -- even if they're just facing away from the camera or standing off in the distance, let alone if the character is wearing a full-face mask -- there's a good chance it's actually a stand-in.
One exception is the Iron Man movies. The IM costume doesn't even exist in most of the shots; they have Robert Downey doing performance capture and they animate the suit on top of him. Although that's probably mainly for the scenes where the helmet opens or closes, the armor goes on or off, that sort of thing.
But if you can see part of the face, as with Batman, then of course they're going to use the same actor. In that case you can still have a visible performance, plus there's continuity with the unmasked version of the character. The audience would have a harder time accepting it as the same person if they couldn't recognize the eyes and mouth.
The only time the role is recast from secret identity to hero is when there's a physical transformation, like from Bixby's Banner to Ferrigno's Hulk, or from Billy Batson to Captain Marvel.