replacing the power switch or on/off switch

If you are talking about the leads from the case panel, your m/b will have a header for those. There will be two pins labeled pwr and two pins labeled reset. Match these up to the connectors from your front panel - note the polarity. Check your manual for the location. If you don't have the manual, what m/b do you have?

Mark