They are not that much of a threat to Luigi (The player), but still causes Luigi to lose 5 HP if he steps on one. To defeat a Spider, you need to use your Poltergust 5000 to suck it up, or you can use your Strobulb on the Spider and there is a chance it could drop a coin, but it will not drop a coin in missions A-5 "Sticky Situation" or A-Boss "Confront the Source" because Spiders re-spawn in those missions.
A Gold Spider is much more rare than a normal Spider, and is usually found after checking furniture. Gold Spiders travel in packs of 2 to 3. The Gold Spider only appears on screen for a few seconds so you have to react fast. If you manage to use your Strobulb on the Gold Spider, it will drop a Gold Bar.