Google your router’s make and model and “factory reset” (e.g. “linksys WRT54G factory reset”) and you’ll get instructions on how. TYPICALLY it’s something like “unplug the power to the router to turn it off, stick a pin in the reset hole on the back and hold it in, power the router back on, and hold the pin in for 30 seconds while the router boots up, then let it reboot itself automatically”.
Note: You will lose any port-forwarding settings, and you’re also resetting the wireless password and the router admin password to defaults. Google the router’s make and model and “admin password” to find out what the default is (usually “admin” for username and password, or blank username and “admin” password, or some variation) after the reset if you need to reconfigure anything.