To make a security code you need to enter the routers address into the address bar on your browser. Chances are that it's 192.168.1.1 but you can find it easily by looking on the bottom or side of the router, the users manual or the web page of the brand of router that you have.
Once you enter that address you will get the routers log in window where you will put the user name and password of the router. That information can also be found on the web page or in the user manual of the router.
Once in the routers internal settings go to the wireless page and select the wireless security sub menu and that's where you can make a security key using one of the routers key generators (WEP , WPA or WPA2) , WPA2 would give you the best security key strength , also this is where you can view the security key once it's made.
Write down the security key and save it in a safe place for when you may need it.
Save your changes and exit the routers settings.
1)Open the web browser that you use: Firefox,Google Chrome,IE,or Opera and type in the IP address for your router,and press the Enter key. http://www.routeripaddress.com/< Router ip addresses can be found here
2)A window will open and then type in your routers default username and password,and press the Enter key again http://www.routerpasswords.com/< Router usernames and passwords found here
3)Navigate to the Wireless Security\Network Security Settings Tab and open it to locate or change your WEP or WPA Security Passphrase. Use WPA because it provides better security.
4)Write this Security Passphrase down and put it in a safe place to access when needed.