If you don't know your password for wifi you will have to connect by ethernet and login to the router settings page to get the password. If you are unable to connect by ethernet or do not know the login for your routers settings page you can do a factory reset on the router by pressing the reset button for 30 - 45 seconds. It's generally a small paperclip size hole on the back. If you are still having difficulty with it we may be able to help more if we know the brand and model number of your router.
netgear wireless-g router wgr614v9