If you are using wireless try switching off wireless security in the router temporarily. If that doesn't help, try connecting the computer directly to the router or modem by ethernet cable.
If either solves the problem, should help narrow down the cause.
Check TCP/IP Properties.
Start, Connect To, Connection, Properties, Scroll Down TCP/IP and highlight, click Properties and check that Obtain DNS and IP address automatically are enabled.
A the moment, your post is too vague for more specific advice. Read the literature which came with the router or download the full manual from the CD which came in the box or from the maker's website.
When you have more idea of possible causes, come back.