My new Laptop Cannot connect to wifi Network?

I just brought a new laptop And i cannot connect to wifi. It says you require a code. I know the code for the Wireless router. But it just does not work. It says unable to connect? something like that! What am i Doing Wrong ?
