What happens if you try to ping 127.0.0.1?
If that also fails, then you have a problem with your network card (possibly the physical card, the drivers, or the TCP/IP stack).
If it works normally (time should be <1ms) then try to ping your router. You can get the IP address of your router if you don't know it by typing ipconfig /all in a Command Prompt and look for Default Gateway.
Is your connection wired or wireless? If it is wired and the attempt to ping the router fails, then you either have a bad network cable or a bad router (could just be a bad port on the router, so try a different network cable and plug it into a different port on the router. If you are wireless and the ping fails then you may have a hardware problem (NIC or router) or you might be getting a lot of wireless interference or are just too far away from the router to get a good signal.